Showing 536 of 578 total issues
Avoid deeply nested control flow statements. Open
for field in val:
yield file, field
Function plain_table
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def plain_table(
Function commit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def commit(
Function _check_blockers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _check_blockers(tmp_dir, lock, info, *, mode, waiters): # noqa: C901, PLR0912
Function rwlock
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def rwlock(tmp_dir, fs, cmd, read, write, hardlink):
Function init_git
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def init_git(
Function fill_stage_dependencies
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fill_stage_dependencies(
Function prepare_default_pager
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def prepare_default_pager(
Avoid deeply nested control flow statements. Open
if last_rev:
result[last_rev] = info.asdict()
except (InvalidRemoteSCMRepo, SCMError):
Function _cloud_status
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _cloud_status(
self,
targets=None,
jobs=None,
remote=None,
- 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 init_git
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def init_git(
Function push_refspec
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def push_refspec(
Function download
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def download(
Function _load_data_from_tree
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _load_data_from_tree(index, prefix, ws, key, tree, hash_name):
Function _collect_specific_target
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _collect_specific_target(
loader: "StageLoad",
target: str,
with_deps: bool,
recursive: bool,
- 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 _download_studio
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _download_studio(
repo_url: str,
name: str,
version: Optional[str] = None,
stage: Optional[str] = None,
- 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 __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__( # noqa: PLR0915, PLR0913
self,
root_dir: Optional[str] = None,
fs: Optional["FileSystem"] = None,
rev: Optional[str] = None,
- 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 _resolve_definitions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _resolve_definitions(
Function collect_active
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def collect_active(
repo: "Repo",
baseline_revs: Collection[str],
**kwargs,
) -> dict[str, list["ExpRange"]]:
- 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 add
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def add(