Showing 154 of 154 total issues
Function net
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def net(argc):
"""net: Various network information commands.
Usage:
net ip (local|global)
net mac INTERFACE
- 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 symlink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def symlink(source, link_name):
import os
os_symlink = getattr(os, "symlink", None)
if callable(os_symlink):
os_symlink(source, link_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 file_lines
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def file_lines(stdin):
split_lines = [""]
paren_depth = 0
for line in stdin.split("\n"):
line = line.strip()
- 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 _range
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _range(argc):
"""range: Construct a range of integers.
Usage:
range END
- 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 ergo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ergo(stdin, namespace=namespace):
if stdin.strip() == "":
return None
try:
return eval(parse(tokenize(stdin)), namespace, True)
- 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 arglist
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def arglist(_function):
if isinstance(_function, function):
return _function.args
# they don't have args attributes since they're not actual Python functions
if isinstance(_function, types.BuiltinFunctionType):
- 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 flatten
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def flatten(arr):
if not isinstance(arr, list):
raise ErgonomicaError("[ergo: flatten]: Non-list passed.")
- 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
TODO found Open
# TODO: have this give the actual offending number
- Exclude checks
TODO found Open
# TODO: instead of checking for a FileNotFoundError, check if the command is in the user's PATH.
- Exclude checks
XXX found Open
notes=FIXME,XXX,TODO
- Exclude checks
TODO found Open
notes=FIXME,XXX,TODO
- Exclude checks
TODO found Open
# TODO: clean this up. potentially take inspiration from Fish shell?
- Exclude checks
TODO found Open
# TODO: complete this
- Exclude checks
FIXME found Open
notes=FIXME,XXX,TODO
- Exclude checks