Showing 96 of 96 total issues
Function loaded
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def loaded(
Function _get_lizer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_lizer(
Function _add_dumped_elem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _add_dumped_elem(
Function default_defaultdict_deserializer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def default_defaultdict_deserializer(
Function _do_load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _do_load(json_obj: object,
Function _map_args
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _map_args(args, decorated, fork_inst, mapper, mapper_kwargs):
Function loads
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def loads(
Function _do_dump
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _do_dump(obj, serializer, cls, initial, kwargs):
Function _get_remaining_args
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_remaining_args(obj: dict,
Function default_dict_deserializer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def default_dict_deserializer(
Function dumped
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def dumped(
Function _map_returnvalue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _map_returnvalue(returnvalue, decorated, fork_inst, mapper, mapper_kwargs):
Function validate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate(
obj: object,
cls: type,
fork_inst: type = StateHolder) -> 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 _do_load
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _do_load(
obj: list,
cls: type,
warn_on_fail: bool,
fork_inst: Type[StateHolder],
- 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_value_for_attr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_value_for_attr(
obj,
cls,
orig_cls,
sig_key,
- 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_constructor_args
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_constructor_args(
obj,
cls,
meta_hints,
attr_getters=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
Avoid too many return
statements within this function. Open
return Verbosity.WITH_NOTHING
Function _do_load
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _do_load(json_obj: object,
deserializer: callable,
cls: type,
initial: bool,
**kwargs):
- 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 default_union_serializer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def default_union_serializer(obj: object, cls: Union, **kwargs) -> object:
"""
Serialize an object to any matching type of the given union. The first
successful serialization is returned.
:param obj: The object that is to be serialized.
- 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
Line too long (80 > 79 characters) Open
_exec('mypy {} --show-error-codes --disallow-untyped-defs'.format(_SUBJECT))
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.