KarrLab/obj_tables

View on GitHub

Showing 425 of 542 total issues

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

    def __init__(self, none=True, default=None, default_cleaned_value=None, none_value=None,
Severity: Major
Found in obj_tables/core.py - About 1 hr to fix

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

        def __init__(self, sympy_type=sympy.Basic, default=None, none_value=None, verbose_name='', description='',
    Severity: Major
    Found in obj_tables/math/symbolic.py - About 1 hr to fix

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

          def __init__(self, min_length=0, max_length=float('inf'), default=None, none_value=None, verbose_name='', description='',
      Severity: Major
      Found in obj_tables/bio/seq.py - About 1 hr to fix

        Function from_dict has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def from_dict(json, models, decode_primary_objects=True, primary_objects=None, decoded=None, ignore_extra_models=False,
        Severity: Major
        Found in obj_tables/core.py - About 1 hr to fix

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

              def __init__(self, verbose_name='', description='Enter a path to a local file or directory',
          Severity: Major
          Found in obj_tables/core.py - About 1 hr to fix

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

                def __init__(self, min_length=0, max_length=float('inf'), default=None, none_value=None, verbose_name='', description='',
            Severity: Major
            Found in obj_tables/bio/seq.py - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                                      if isinstance(attr, (
                                          OneToOneAttribute,
                                          OneToManyAttribute,
                                          ManyToOneAttribute,
                                          ManyToManyAttribute)) and \
              Severity: Major
              Found in obj_tables/core.py - About 1 hr to fix

                Function write_toc has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def write_toc(self, writer, models, schema_name, date, doc_metadata, grouped_objects, write_schema=False, protected=True):
                Severity: Major
                Found in obj_tables/io.py - About 1 hr to fix

                  Function get_fields has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def get_fields(cls, schema_name, date, doc_metadata, doc_metadata_model, model_metadata, include_all_attributes=True, sheet_models=None):
                  Severity: Major
                  Found in obj_tables/io.py - About 1 hr to fix

                    Function _get_coeffs_for_vars has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def _get_coeffs_for_vars(self):
                            """ Get coefficients for variables in a linear expression in standard form
                    
                            Returns:
                                :obj:`list`: of :obj:`(:obj:`float`, :obj:`str`)`: coefficient and model id pairs
                    Severity: Minor
                    Found in obj_tables/math/expression.py - About 55 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_xlsx_validation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
                            """ Get XLSX validation
                    
                            Args:
                                sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
                    Severity: Minor
                    Found in obj_tables/chem/core.py - About 55 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_xlsx_validation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
                            """ Get XLSX validation
                    
                            Args:
                                sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
                    Severity: Minor
                    Found in obj_tables/chem/core.py - About 55 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 serialize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def serialize(self, include_compartment=True):
                            """ Generate a string representation
                    
                            Args:
                                include_compartment (:obj:`bool`, optional): if :obj:`True`, include compartment in string representation
                    Severity: Minor
                    Found in obj_tables/chem/core.py - About 55 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 to_dict has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def to_dict(self):
                            """ Get a dictionary representation
                    
                            Returns:
                                :obj:`dict`: dictionary representation
                    Severity: Minor
                    Found in obj_tables/chem/core.py - About 55 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 main has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def main():
                        with App() as app:
                            try:
                                app.run()
                            except SystemExit as exception:
                    Severity: Minor
                    Found in obj_tables/__main__.py - About 55 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 serialize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def serialize(self):
                            """ Generate a string representation
                    
                            Returns:
                                :obj:`str`: string representation
                    Severity: Minor
                    Found in obj_tables/chem/core.py - About 55 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 import_custom_IO_classes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def import_custom_IO_classes(self, io_classes_file_basename=None):
                            """ If the schema repo has an IO classes file, import custom IO classes for accessing data files
                    
                            Args:
                                io_classes_file_basename (:obj:`str`, optional): custom basename for the custom IO classes file,
                    Severity: Minor
                    Found in obj_tables/migrate.py - About 55 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 __init__ has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def __init__(self, min_length=0, max_length=255, none=False, default='', default_cleaned_value='', none_value='',
                                     verbose_name='', description='',
                                     primary=False, unique=False, unique_case_insensitive=False):
                            """
                            Args:
                    Severity: Minor
                    Found in obj_tables/core.py - About 55 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 related_validate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def related_validate(self, obj, value):
                            """ Determine if :obj:`value` is a valid value of the related attribute
                    
                            Args:
                                obj (:obj:`Model`): object being validated
                    Severity: Minor
                    Found in obj_tables/core.py - About 55 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_xlsx_validation has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_xlsx_validation(self, sheet_models=None, doc_metadata_model=None):
                            """ Get XLSX validation
                    
                            Args:
                                sheet_models (:obj:`list` of :obj:`Model`, optional): models encoded as separate sheets
                    Severity: Minor
                    Found in obj_tables/core.py - About 55 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