scitran/core

View on GitHub

Showing 518 of 518 total issues

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

        def f(method, _id, query_params = None, payload = None, exclude_params=None):
Severity: Minor
Found in api/auth/listauth.py - About 35 mins to fix

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

            def f(method, _id, query_params = None, payload = None, exclude_params=None):
    Severity: Minor
    Found in api/auth/listauth.py - About 35 mins to fix

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

          def f(method, query=None, user=None, public=False, projection=None):
      Severity: Minor
      Found in api/auth/containerauth.py - About 35 mins to fix

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

            def create_el(self, analysis, parent_type, parent_id, origin, uid=None):
        Severity: Minor
        Found in api/dao/containerstorage.py - About 35 mins to fix

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

          def try_replace_one(db, coll_name, query, update, upsert=False):
          Severity: Minor
          Found in api/dao/dbutil.py - About 35 mins to fix

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

                def exec_op(self, action, _id=None, query_params=None, payload=None, exclude_params=None):
            Severity: Minor
            Found in api/dao/liststorage.py - About 35 mins to fix

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

                  def __init__(self, cont_name, use_object_id=False, use_delete_tag=False, parent_cont_name=None, child_cont_name=None):
              Severity: Minor
              Found in api/dao/basecontainerstorage.py - About 35 mins to fix

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

                    def exec_op(self, action, _id=None, query_params=None, payload=None, exclude_params=None):
                Severity: Minor
                Found in api/dao/liststorage.py - About 35 mins to fix

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

                          def f(method, _id, query_params = None, payload = None, exclude_params=None):
                  Severity: Minor
                  Found in api/validators.py - About 35 mins to fix

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

                    def fault_tolerant_replace_one(db, coll_name, query, update, upsert=False):
                    Severity: Minor
                    Found in api/dao/dbutil.py - About 35 mins to fix

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

                      def send_json_http_exception(response, message, code, request_id, custom=None):
                      Severity: Minor
                      Found in api/util.py - About 35 mins to fix

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

                        def undelete(cont_name, cont_id, filename=None, include_parents=False, always_propagate=False):
                        Severity: Minor
                        Found in bin/undelete.py - About 35 mins to fix

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

                          def _create_query(cont, cont_type, parent_type, parent_id, upload_type):
                          Severity: Minor
                          Found in api/dao/hierarchy.py - About 35 mins to fix

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

                            def propagate_changes(cont_name, cont_ids, query, update, include_refs=False):
                            Severity: Minor
                            Found in api/dao/containerutil.py - About 35 mins to fix

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

                              def route(path, target, h=None, m=None, name=None):
                              Severity: Minor
                              Found in api/api.py - About 35 mins to fix

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

                                def validate_data(data, schema_json, schema_type, verb, optional=False):
                                Severity: Minor
                                Found in api/validators.py - About 35 mins to fix

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

                                      def get_all_for_targets(self, target_type, target_ids, user=None, projection=None, collection_id=None):
                                  Severity: Minor
                                  Found in api/dao/containerstorage.py - About 35 mins to fix

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

                                    def _get_targets(project_obj, session, acquisition, type_, timestamp):
                                    Severity: Minor
                                    Found in api/dao/hierarchy.py - About 35 mins to fix

                                      Function filter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          def filter(children, criterion, _id=False):
                                              if _id:
                                                  selectSes = '_id'
                                                  selectFil = '_id'
                                              else:
                                      Severity: Minor
                                      Found in api/resolver.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 eval_rule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def eval_rule(rule, file_, container):
                                          """
                                          Decide if a rule should spawn a job.
                                          """
                                      
                                      
                                      Severity: Minor
                                      Found in api/jobs/rules.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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language