ramonhagenaars/jsons

View on GitHub

Showing 96 of 96 total issues

Function loaded has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def loaded(
Severity: Minor
Found in jsons/decorators.py - About 35 mins to fix

    Function _get_lizer has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def _get_lizer(
    Severity: Minor
    Found in jsons/_lizers_impl.py - About 35 mins to fix

      Function _add_dumped_elem has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def _add_dumped_elem(
      Severity: Minor
      Found in jsons/serializers/default_object.py - About 35 mins to fix

        Function default_defaultdict_deserializer has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def default_defaultdict_deserializer(
        Severity: Minor
        Found in jsons/deserializers/default_defaultdict.py - About 35 mins to fix

          Function _do_load has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _do_load(json_obj: object,
          Severity: Minor
          Found in jsons/_load_impl.py - About 35 mins to fix

            Function _map_args has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def _map_args(args, decorated, fork_inst, mapper, mapper_kwargs):
            Severity: Minor
            Found in jsons/decorators.py - About 35 mins to fix

              Function loads has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def loads(
              Severity: Minor
              Found in jsons/_load_impl.py - About 35 mins to fix

                Function _do_dump has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def _do_dump(obj, serializer, cls, initial, kwargs):
                Severity: Minor
                Found in jsons/_dump_impl.py - About 35 mins to fix

                  Function _get_remaining_args has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def _get_remaining_args(obj: dict,
                  Severity: Minor
                  Found in jsons/deserializers/default_object.py - About 35 mins to fix

                    Function default_dict_deserializer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def default_dict_deserializer(
                    Severity: Minor
                    Found in jsons/deserializers/default_dict.py - About 35 mins to fix

                      Function dumped has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def dumped(
                      Severity: Minor
                      Found in jsons/decorators.py - About 35 mins to fix

                        Function _map_returnvalue has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def _map_returnvalue(returnvalue, decorated, fork_inst, mapper, mapper_kwargs):
                        Severity: Minor
                        Found in jsons/decorators.py - About 35 mins to fix

                          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:
                              """
                          Severity: Minor
                          Found in jsons/_validation.py - About 35 mins to fix

                          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],
                          Severity: Minor
                          Found in jsons/deserializers/default_list.py - About 35 mins to fix

                          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,
                          Severity: Minor
                          Found in jsons/deserializers/default_object.py - About 35 mins to fix

                          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,
                          Severity: Minor
                          Found in jsons/deserializers/default_object.py - About 35 mins to fix

                          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
                          Severity: Major
                          Found in jsons/classes/verbosity.py - About 30 mins to fix

                            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):
                            Severity: Minor
                            Found in jsons/_load_impl.py - About 25 mins to fix

                            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.
                            Severity: Minor
                            Found in jsons/serializers/default_union.py - About 25 mins to fix

                            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))
                            Severity: Minor
                            Found in SConstruct.py by pep8

                            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.
                            Severity
                            Category
                            Status
                            Source
                            Language