Showing 9 of 9 total issues
Function grand_code_review
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def grand_code_review( # noqa: CFQ002
Function grand_code_review
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def grand_code_review( # noqa: CFQ002
path: str,
date_from: datetime.datetime,
date_to: datetime.datetime,
web_base_repo_url: str,
- 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 fetch_git_history
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch_git_history(
Function fetch_git_history
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch_git_history(
Function fetch_git_history
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fetch_git_history(
Function check
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def check(
Function output_review_report
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def output_review_report(
Function fetch_modules_total_lines_map
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fetch_modules_total_lines_map(path: str, config: Mapping[str, Any]) -> Mapping[str, int]:
module_total_lines: DefaultDict[str, int] = collections.defaultdict(int)
for module in config['modules']:
wildcards = [
os.path.join(path, module, '**', f'*.{e}')
- 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 get_touched_files_in_commit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_touched_files_in_commit(
commit: Commit,
config: Mapping[str, Any],
) -> Iterable[Tuple[str, int]]:
touched_lines_per_module: DefaultDict[str, int] = collections.defaultdict(int)
- 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"