omar2535/GraphQLer

View on GitHub
graphqler/fuzzer/fengine/materializers/materializer.py

Summary

Maintainability
C
1 day
Test Coverage

Function materialize_output_recursive has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

    def materialize_output_recursive(self,
                                     operator_info: dict,
                                     output_field: dict,
                                     used_objects: list[str],
                                     objects_bucket: ObjectsBucket,
Severity: Minor
Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 4 hrs 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 materialize_input_recursive has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    def materialize_input_recursive(self,
                                    operator_info: dict,
                                    input_field: dict,
                                    objects_bucket: ObjectsBucket,
                                    input_name: str,
Severity: Minor
Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 2 hrs 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

File materializer.py has 258 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Materializer:
Base class for a regular materializer
"""

from ..exceptions.hard_dependency_not_met_exception import HardDependencyNotMetException
Severity: Minor
Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 2 hrs to fix

    Function materialize_output_recursive has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def materialize_output_recursive(self,
    Severity: Major
    Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 50 mins to fix

      Function materialize_input_recursive has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def materialize_input_recursive(self,
      Severity: Major
      Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 50 mins to fix

        Function materialize_output_object_fields has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def materialize_output_object_fields(self,
        Severity: Minor
        Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 45 mins to fix

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

              def materialize_input_fields(self, operator_info: dict, inputs: dict, objects_bucket: ObjectsBucket, max_depth: int, current_depth: int = 0) -> str:
          Severity: Minor
          Found in graphqler/fuzzer/fengine/materializers/materializer.py - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status