Showing 42 of 47 total issues
Function enforce_present_absent
has a Cognitive Complexity of 18 (exceeds 10 allowed). Consider refactoring. Open
def enforce_present_absent(self, *partial_names: str) -> Iterator[Fuss]:
"""Enforce files that should be present or absent.
:param partial_names: Names of the files to enforce configs for.
:return: Fuss generator.
- 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 traverse_yaml_tree
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
def traverse_yaml_tree(yaml_obj: YamlObject, change: JsonDict):
"""Traverse a YAML document recursively and change values, keeping its formatting and comments."""
for key, value in change.items():
if key not in yaml_obj:
if isinstance(yaml_obj, dict):
- 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 _compare_list_elements
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compare_list_elements( # pylint: disable=too-many-arguments
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function ci_build
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ci_build(c, full=False, recreate=False, docs=True, python=""):
Function __call__
has a Cognitive Complexity of 11 (exceeds 10 allowed). Consider refactoring. Open
def __call__(self) -> Comparison:
"""Compare two flattened dictionaries and compute missing and different items."""
if self.flat_expected.items() <= self.flat_actual.items():
return self
- 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 _compare_list_elements
has a Cognitive Complexity of 11 (exceeds 10 allowed). Consider refactoring. Open
def _compare_list_elements( # pylint: disable=too-many-arguments
self, key: str, parent_key: str, child_key: str, actual_detail: ListDetail, expected_detail: ListDetail
) -> None:
"""Compare list elements by their keys or hashes."""
display = []
- 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
Starting a process with a partial executable path Open
output = subprocess.check_output( # noqa: S603
# TODO: fix: this command might not work on Windows; maybe read ~/.gitconfig directly instead?
["git", "config", "--get", GIT_CORE_EXCLUDES_FILE], # noqa: S607
universal_newlines=True,
- Exclude checks
Unexpected tabs found. Open
@echo ' pytest to run tests'
- Exclude checks
Unexpected tabs found. Open
pytest
- Exclude checks
Unexpected tabs found. Open
sphinx-apidoc --force --module-first --separate --implicit-namespaces --output-dir docs/source nitpick/
- Exclude checks
Unexpected tabs found. Open
pre-commit gc
- Exclude checks
Unexpected tabs found. Open
-rm .cache/make/sphinx
- Exclude checks
Unexpected tabs found. Open
pre-commit install --hook-type commit-msg
- Exclude checks
Unexpected tabs found. Open
@echo ' pre-commit to install and update pre-commit hooks'
- Exclude checks
Unexpected tabs found. Open
poetry update
- Exclude checks
Unexpected tabs found. Open
$(MAKE)
- Exclude checks
Unexpected tabs found. Open
@fd --changed-before $(RERUN_AFTER) auto .cache/make --exec-batch rm '{}' ;
- Exclude checks
Unexpected tabs found. Open
pre-commit autoupdate
- Exclude checks
Unexpected tabs found. Open
-rm .cache/make/run
- Exclude checks