Showing 12 of 15 total issues
Function get_filename
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def get_filename(
self,
*,
variable_suffix: str = "Variable",
variable_axes_tags: bool = True,
- 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_characters
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def get_characters(
self,
*,
ignore_blank: bool = False,
) -> Generator[dict[str, Any]]:
- 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_features_tags
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_features_tags(
self,
) -> list[str]:
"""
Gets the font opentype features tags.
- 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 to_static
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def to_static(
Function get_image
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_image( # type: ignore
Function save_variable_instances
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def save_variable_instances(
Function get_fingerprint_match
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_fingerprint_match( # type: ignore
Function parse_unicodes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def parse_unicodes(
unicodes: Iterable[int | str] | str,
) -> list[int]:
if isinstance(unicodes, (list, set, tuple)):
# convert possible int codepoints to hex 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 _save_with_flavor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _save_with_flavor(
Function rename
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rename(
Function __exit__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __exit__( # type: ignore
Function get_filename
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_filename(