Showing 468 of 468 total issues
Function createDeckFilter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
let createDeckFilter = (query) => {
let queryIn = {}
if (query) {
let parts = query.split("&")
for (let part of parts) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateTitleWidth
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
let updateTitleWidth = () => {
let width = useMinimal ? 278 : 320
if (appData.showHideButton) {
width -= 26
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deckFrequencySubLists
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
let deckFrequencySubLists = function (decklist) {
let card_count = -1;
let sublists = [];
let current_sublist = null;
let reverse_sort = function(a, b){return b.count_in_deck - a.count_in_deck}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parse_sideboard_submit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_sideboard_submit(blob):
import app.mtga_app as mtga_app
app.mtga_app.mtga_logger.info("{}".format(pprint.pformat(blob)))
og_deck_id = mtga_app.mtga_watch_app.intend_to_join_game_with.deck_id
og_deck_name = mtga_app.mtga_watch_app.intend_to_join_game_with.pool_name
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function to_min_json
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_min_json(self):
min_deck = {}
min_side = {}
for card in self.cards:
if card.mtga_id not in min_deck:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function click_event
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def click_event(_x, _y, button, pressed):
if pressed:
if button == mouse.Button.right:
general_output_queue.put({"right_click": True})
if button == mouse.Button.left:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rank_cost
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rank_cost(cost):
cost_total = 0
for cost_bubble in cost:
try:
cost_total += int(cost_bubble)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rank_colors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rank_colors(colors):
color_val = 0
if "W" in colors:
color_val += 1
if "U" in colors:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"