Function do_create
has a Cognitive Complexity of 127 (exceeds 5 allowed). Consider refactoring. Open
def do_create(self, args, repository, manifest):
"""Create new archive"""
key = manifest.key
matcher = PatternMatcher(fallback=True)
matcher.add_inclexcl(args.patterns)
- 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
File create_cmd.py
has 885 lines of code (exceeds 250 allowed). Consider refactoring. Open
import errno
import sys
import argparse
import logging
import os
Function _rec_walk
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
def _rec_walk(
self,
*,
path,
parent_fd,
- 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 _process_any
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
def _process_any(self, *, path, parent_fd, name, st, fso, cache, read_special, dry_run, strip_prefix):
"""
Call the right method on the given FilesystemObjectProcessor.
"""
- 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 _rec_walk
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def _rec_walk(
Function build_parser_create
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_parser_create(self, subparsers, common_parser, mid_common_parser):
from ._common import process_epilog
from ._common import define_exclusion_group
create_epilog = process_epilog(
Function _process_any
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def _process_any(self, *, path, parent_fd, name, st, fso, cache, read_special, dry_run, strip_prefix):
Avoid deeply nested control flow statements. Open
if not recurse_excluded_dir:
if keep_exclude_tags:
if not dry_run:
fso.process_dir_with_fd(
path=path, fd=child_fd, st=st, strip_prefix=strip_prefix
Avoid too many return
statements within this function. Open
return fso.process_file(
Avoid too many return
statements within this function. Open
return fso.process_file(
Avoid too many return
statements within this function. Open
return fso.process_symlink(
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return fso.process_dev(
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return fso.process_fifo(
Avoid too many return
statements within this function. Open
return fso.process_dev(
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return fso.process_file(
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return fso.process_file(
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return