Showing 3 of 8 total issues
Function bootstrap
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def bootstrap(session):
del session # Unused
jinja = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.join("ci", "templates")),
trim_blocks=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 _build
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _build(session):
global BUILD
if BUILD is None:
install_from_requirements(session, "wheel")
session.run("python", "setup.py", "bdist_wheel")
- 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 match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def match(self, matchable, base) -> typing.Iterator[typing.Callable]:
"""If there is a match in the context of base, yield implementation."""
if base is None and self._abstract:
raise ValueError
for structure, func in self._get_matchers(base):
- 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"