Showing 224 of 1,036 total issues
Function setup_experiment
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def setup_experiment(
log, debug=True, verbose=False, app=None, exp_config=None, local_checks=True
):
"""Checks the experiment's python dependencies, then prepares a temp directory
with files merged from the custom experiment and Dallinger.
- Read upRead up
- Create a ticketCreate a ticket
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_image
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_image(
tmp_dir, base_image_name, out, needs_chrome=False, force_build=True
) -> str:
"""Build the docker image for the experiment and return its name.
If force_build=False, then the image will only be rebuilt if requirements.txt or prepare_docker_image.sh
- Read upRead up
- Create a ticketCreate a ticket
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 register
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def register(self, key, type_, synonyms=None, sensitive=False, validators=None):
if synonyms is None:
synonyms = set()
if key in self.types:
raise KeyError("Config key {} is already registered".format(key))
- Read upRead up
- Create a ticketCreate a ticket
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 tag_triples
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def tag_triples(self) -> Iterable[str]:
"""
Returns a generator of all simple tag triples formed from the tags in
the filename
"""
- Read upRead up
- Create a ticketCreate a ticket
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"