Showing 517 of 578 total issues
Function _get_fs_type
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def _get_fs_type(path):
partition = {}
for part in psutil.disk_partitions(all=True):
if part.fstype:
try:
- 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 du
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def du(
Function update_import
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def update_import(
Function rich_table
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def rich_table(
Function save
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def save(
Function used_objs
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def used_objs(
Function get_url
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_url(url, out=None, *, fs_config=None, jobs=None, force=False, config=None):
Function build_data_index
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build_data_index( # noqa: C901, PLR0912
Function _build_rows
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _build_rows(
Function _reproduce
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _reproduce(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function checkout
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def checkout(
Function show_metrics
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def show_metrics(
Function fill_from_lock
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def fill_from_lock(stage, lock_data=None):
"""Fill values for params, checksums for outs and deps from lock."""
if not lock_data:
return
- 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 fill_stage_dependencies
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fill_stage_dependencies(
Avoid deeply nested control flow statements. Open
Open
for field in val:
yield file, field
Function run
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def run(
Function _check_blockers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _check_blockers(tmp_dir, lock, info, *, mode, waiters): # noqa: C901, PLR0912
Function init_git
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def init_git(
Function save
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def save(