src/triage/component/architect/builders.py

Summary

Maintainability
D
1 day
Test Coverage

File builders.py has 530 lines of code (exceeds 400 allowed). Consider refactoring.
Open

import io
import subprocess

import verboselogs, logging
logger = verboselogs.VerboseLogger(__name__)
Severity: Major
Found in src/triage/component/architect/builders.py - About 5 hrs to fix

    Function build_matrix has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        def build_matrix(
            self,
            as_of_times,
            label_name,
            label_type,
    Severity: Minor
    Found in src/triage/component/architect/builders.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

    Function stitch_csvs has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def stitch_csvs(self, features_queries, label_query, matrix_store, matrix_uuid):
            """
            Get all features related this matrix_uuid as CSV files, as well as the labels. 
            Join all the csv elements columnwise and create the final matrix. 
            The last column is the label. 
    Severity: Major
    Found in src/triage/component/architect/builders.py - About 2 hrs to fix

      Function build_matrix has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def build_matrix(
              self,
              as_of_times,
              label_name,
              label_type,
      Severity: Minor
      Found in src/triage/component/architect/builders.py - About 1 hr to fix

        Function stitch_csvs has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            def stitch_csvs(self, features_queries, label_query, matrix_store, matrix_uuid):
                """
                Get all features related this matrix_uuid as CSV files, as well as the labels. 
                Join all the csv elements columnwise and create the final matrix. 
                The last column is the label. 
        Severity: Minor
        Found in src/triage/component/architect/builders.py - About 1 hr 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 make_entity_date_table has 7 arguments (exceeds 5 allowed). Consider refactoring.
        Open

            def make_entity_date_table(
        Severity: Major
        Found in src/triage/component/architect/builders.py - About 45 mins to fix

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

              def __init__(
          Severity: Major
          Found in src/triage/component/architect/builders.py - About 45 mins to fix

            Function build_matrix has 7 arguments (exceeds 5 allowed). Consider refactoring.
            Open

                def build_matrix(
            Severity: Major
            Found in src/triage/component/architect/builders.py - About 45 mins to fix

              Function _outer_join_query has 6 arguments (exceeds 5 allowed). Consider refactoring.
              Open

                  def _outer_join_query(
              Severity: Minor
              Found in src/triage/component/architect/builders.py - About 35 mins to fix

                Module level import not at top of file
                Open

                import pyarrow

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Inline comment should start with '# '
                Open

                            num_observations=row_count[0], #row count is a tuple

                Separate inline comments by at least two spaces.

                An inline comment is a comment on the same line as a statement.
                Inline comments should be separated by at least two spaces from the
                statement. They should start with a # and a single space.
                
                Each line of a block comment starts with a # and a single space
                (unless it is indented text inside the comment).
                
                Okay: x = x + 1  # Increment x
                Okay: x = x + 1    # Increment x
                Okay: # Block comment
                E261: x = x + 1 # Increment x
                E262: x = x + 1  #Increment x
                E262: x = x + 1  #  Increment x
                E265: #Block comment
                E266: ### Block comment

                Trailing whitespace
                Open

                                get all the features from this design matrix. 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Module level import not at top of file
                Open

                from triage.component.architect.utils import (

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Trailing whitespace
                Open

                                select {"".join(right_column_selections)[2:] if not column_override else column_override} 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (131 > 88 characters)
                Open

                                f"Not the same order of entity id and knowledge date in all features and label files for matrix uuid {matrix_uuid}"

                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.

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Block comment should start with '# '
                Open

                        #df = pd.read_csv(filename_, parse_dates=["as_of_date"])

                Separate inline comments by at least two spaces.

                An inline comment is a comment on the same line as a statement.
                Inline comments should be separated by at least two spaces from the
                statement. They should start with a # and a single space.
                
                Each line of a block comment starts with a # and a single space
                (unless it is indented text inside the comment).
                
                Okay: x = x + 1  # Increment x
                Okay: x = x + 1    # Increment x
                Okay: # Block comment
                E261: x = x + 1 # Increment x
                E262: x = x + 1  #Increment x
                E262: x = x + 1  #  Increment x
                E265: #Block comment
                E266: ### Block comment

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Multiple imports on one line
                Open

                import verboselogs, logging

                Place imports on separate lines.

                Okay: import os\nimport sys
                E401: import sys, os
                
                Okay: from subprocess import Popen, PIPE
                Okay: from myclas import MyClass
                Okay: from foo.bar.yourclass import YourClass
                Okay: import myclass
                Okay: import foo.bar.yourclass

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Block comment should start with '# '
                Open

                            #include_index=False,

                Separate inline comments by at least two spaces.

                An inline comment is a comment on the same line as a statement.
                Inline comments should be separated by at least two spaces from the
                statement. They should start with a # and a single space.
                
                Each line of a block comment starts with a # and a single space
                (unless it is indented text inside the comment).
                
                Okay: x = x + 1  # Increment x
                Okay: x = x + 1    # Increment x
                Okay: # Block comment
                E261: x = x + 1 # Increment x
                E262: x = x + 1  #Increment x
                E262: x = x + 1  #  Increment x
                E265: #Block comment
                E266: ### Block comment

                Too many blank lines (2)
                Open

                    def stitch_csvs(self, features_queries, label_query, matrix_store, matrix_uuid):

                Separate top-level function and class definitions with two blank lines.

                Method definitions inside a class are separated by a single blank
                line.
                
                Extra blank lines may be used (sparingly) to separate groups of
                related functions.  Blank lines may be omitted between a bunch of
                related one-liners (e.g. a set of dummy implementations).
                
                Use blank lines in functions, sparingly, to indicate logical
                sections.
                
                Okay: def a():\n    pass\n\n\ndef b():\n    pass
                Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                Okay: default = 1\nfoo = 1
                Okay: classify = 1\nfoo = 1
                
                E301: class Foo:\n    b = 0\n    def bar():\n        pass
                E302: def a():\n    pass\n\ndef b(n):\n    pass
                E302: def a():\n    pass\n\nasync def b(n):\n    pass
                E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                E303: def a():\n\n\n\n    pass
                E304: @decorator\n\ndef a():\n    pass
                E305: def a():\n    pass\na()
                E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                Blank line contains whitespace
                Open

                    

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (92 > 88 characters)
                Open

                        df_pl = pl.read_csv(filename_, infer_schema_length=0).with_columns(pl.all().exclude(

                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.

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        # before saving the matrix metadata we need to cast datetimes to str 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Too many blank lines (2)
                Open

                    def label_load_query(

                Separate top-level function and class definitions with two blank lines.

                Method definitions inside a class are separated by a single blank
                line.
                
                Extra blank lines may be used (sparingly) to separate groups of
                related functions.  Blank lines may be omitted between a bunch of
                related one-liners (e.g. a set of dummy implementations).
                
                Use blank lines in functions, sparingly, to indicate logical
                sections.
                
                Okay: def a():\n    pass\n\n\ndef b():\n    pass
                Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                Okay: default = 1\nfoo = 1
                Okay: classify = 1\nfoo = 1
                
                E301: class Foo:\n    b = 0\n    def bar():\n        pass
                E302: def a():\n    pass\n\ndef b(n):\n    pass
                E302: def a():\n    pass\n\nasync def b(n):\n    pass
                E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                E303: def a():\n\n\n\n    pass
                E304: @decorator\n\ndef a():\n    pass
                E305: def a():\n    pass\na()
                E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                Line too long (107 > 88 characters)
                Open

                        :param feature_dictionary: a dictionary of feature tables and features to be included in the matrix

                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.

                Trailing whitespace
                Open

                        # starting with features 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (89 > 88 characters)
                Open

                        verified_filenames = remove_entity_id_and_knowledge_dates(filenames, matrix_uuid)

                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.

                Line too long (117 > 88 characters)
                Open

                        """ Loop over tables in features schema, writing the data from each to a csv. Return the full list of feature 

                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.

                Indentation is not a multiple of 4
                Open

                           subprocess.run(cmd_line, shell=True)

                Use indent_size (PEP8 says 4) spaces per indentation level.

                For really old code that you don't want to mess up, you can continue
                to use 8-space tabs.
                
                Okay: a = 1
                Okay: if a == 0:\n    a = 1
                E111:   a = 1
                E114:   # a = 1
                
                Okay: for item in items:\n    pass
                E112: for item in items:\npass
                E115: for item in items:\n# Hi\n    pass
                
                Okay: a = 1\nb = 2
                E113: a = 1\n    b = 2
                E116: a = 1\n    # b = 2

                Blank line contains whitespace
                Open

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Blank line contains whitespace
                Open

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Blank line contains whitespace
                Open

                    

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (123 > 88 characters)
                Open

                            JOIN {self.db_config["labels_schema_name"]}.{self.db_config["labels_table_name"]} using (entity_id, as_of_date)

                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.

                Trailing whitespace
                Open

                                to this design matrix. 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (100 > 88 characters)
                Open

                        logger.debug(f"number of feature files to paste for matrix {matrix_uuid}: {len(filenames)}")

                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.

                Line too long (106 > 88 characters)
                Open

                        # check if the entities_id and knowledge_dates are the same among all the features and label files

                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.

                Trailing whitespace
                Open

                        if len(df_pl.get_column('as_of_date').head(1)[0].split()) > 1: 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        # addinig _sorted and _fixed files to list of files to rm 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        and the csv with all the features and label stitched togheter. 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Indentation is not a multiple of 4
                Open

                           logger.debug(f"removing files with command {cmd_line}")

                Use indent_size (PEP8 says 4) spaces per indentation level.

                For really old code that you don't want to mess up, you can continue
                to use 8-space tabs.
                
                Okay: a = 1
                Okay: if a == 0:\n    a = 1
                E111:   a = 1
                E114:   # a = 1
                
                Okay: for item in items:\n    pass
                E112: for item in items:\npass
                E115: for item in items:\n# Hi\n    pass
                
                Okay: a = 1\nb = 2
                E113: a = 1\n    b = 2
                E116: a = 1\n    # b = 2

                Module level import not at top of file
                Open

                from triage.component.results_schema import Matrix

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Module level import not at top of file
                Open

                from triage.database_reflection import table_has_data, table_row_count

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Trailing whitespace
                Open

                                ) 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (105 > 88 characters)
                Open

                                select {"".join(right_column_selections)[2:] if not column_override else column_override} 

                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.

                Line too long (119 > 88 characters)
                Open

                        if matrix_type == "test" or matrix_type == "production" or self.include_missing_labels_in_train_as is not None:

                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.

                Line too long (94 > 88 characters)
                Open

                        for num, (feature_table_name, feature_names) in enumerate(feature_dictionary.items()):

                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.

                Line too long (92 > 88 characters)
                Open

                        logger.debug(f"paste CSVs columnwise for matrix {matrix_uuid} cmd line: {cmd_line}")

                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.

                Line too long (120 > 88 characters)
                Open

                        logger.debug(f"time casting entity_id and as_of_date of matrix with uuid {matrix_uuid} (sec): {(end-start)/60}")

                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.

                Line too long (92 > 88 characters)
                Open

                        logger.debug(f"Generating gzip of full matrix on cmd line with command: {cmd_line}")

                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.

                Trailing whitespace
                Open

                        Get all features related this matrix_uuid as CSV files, as well as the labels. 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                            features_queries (list): List of the requried queries to execute to 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        except AssertionError as e: 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        else: 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        # convert into pandas series 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (94 > 88 characters)
                Open

                        logger.debug(f"Pandas DF memory usage: {df.memory_usage(deep=True).sum()/1000000} MB")

                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.

                Trailing whitespace
                Open

                        # if matrix store is S3 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Too many blank lines (2)
                Open

                    def remove_unnecessary_files(self, filenames, path_, matrix_uuid):

                Separate top-level function and class definitions with two blank lines.

                Method definitions inside a class are separated by a single blank
                line.
                
                Extra blank lines may be used (sparingly) to separate groups of
                related functions.  Blank lines may be omitted between a bunch of
                related one-liners (e.g. a set of dummy implementations).
                
                Use blank lines in functions, sparingly, to indicate logical
                sections.
                
                Okay: def a():\n    pass\n\n\ndef b():\n    pass
                Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                Okay: default = 1\nfoo = 1
                Okay: classify = 1\nfoo = 1
                
                E301: class Foo:\n    b = 0\n    def bar():\n        pass
                E302: def a():\n    pass\n\ndef b(n):\n    pass
                E302: def a():\n    pass\n\nasync def b(n):\n    pass
                E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                E303: def a():\n\n\n\n    pass
                E304: @decorator\n\ndef a():\n    pass
                E305: def a():\n    pass\na()
                E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                No newline at end of file
                Open

                Trailing blank lines are superfluous.

                Okay: spam(1)
                W391: spam(1)\n
                
                However the last line should end with a new line (warning W292).

                Module level import not at top of file
                Open

                from sqlalchemy.orm import sessionmaker

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Trailing whitespace
                Open

                        Join all the csv elements columnwise and create the final matrix. 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (106 > 88 characters)
                Open

                                f"Different number of rows among features and label files for matrix uuid {matrix_uuid} ",

                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.

                Indentation is not a multiple of 4
                Open

                           cmd_line = 'rm ' + filename_ 

                Use indent_size (PEP8 says 4) spaces per indentation level.

                For really old code that you don't want to mess up, you can continue
                to use 8-space tabs.
                
                Okay: a = 1
                Okay: if a == 0:\n    a = 1
                E111:   a = 1
                E114:   # a = 1
                
                Okay: for item in items:\n    pass
                E112: for item in items:\npass
                E115: for item in items:\n# Hi\n    pass
                
                Okay: a = 1\nb = 2
                E113: a = 1\n    b = 2
                E116: a = 1\n    # b = 2

                Module level import not at top of file
                Open

                from triage.tracking import built_matrix, skipped_matrix, errored_matrix

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Line too long (95 > 88 characters)
                Open

                        feature_queries = self.feature_load_queries(feature_dictionary, entity_date_table_name)

                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.

                Trailing whitespace
                Open

                            label_query (string): The query required to get the label associated 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        try: 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                            path_ (string): Path 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Module level import not at top of file
                Open

                import numpy as np

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Line too long (89 > 88 characters)
                Open

                            DROP TABLE IF EXISTS {self.db_config["features_schema_name"]}."{table_name}";

                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.

                Line too long (98 > 88 characters)
                Open

                        output, labels = self.stitch_csvs(feature_queries, label_query, matrix_store, matrix_uuid)

                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.

                Trailing whitespace
                Open

                        """ Loop over tables in features schema, writing the data from each to a csv. Return the full list of feature 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Module level import not at top of file
                Open

                import time

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Expected 2 blank lines, found 1
                Open

                class BuilderBase:

                Separate top-level function and class definitions with two blank lines.

                Method definitions inside a class are separated by a single blank
                line.
                
                Extra blank lines may be used (sparingly) to separate groups of
                related functions.  Blank lines may be omitted between a bunch of
                related one-liners (e.g. a set of dummy implementations).
                
                Use blank lines in functions, sparingly, to indicate logical
                sections.
                
                Okay: def a():\n    pass\n\n\ndef b():\n    pass
                Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                Okay: default = 1\nfoo = 1
                Okay: classify = 1\nfoo = 1
                
                E301: class Foo:\n    b = 0\n    def bar():\n        pass
                E302: def a():\n    pass\n\ndef b(n):\n    pass
                E302: def a():\n    pass\n\nasync def b(n):\n    pass
                E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                E303: def a():\n\n\n\n    pass
                E304: @decorator\n\ndef a():\n    pass
                E305: def a():\n    pass\na()
                E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                Too many blank lines (2)
                Open

                    def make_entity_date_table(

                Separate top-level function and class definitions with two blank lines.

                Method definitions inside a class are separated by a single blank
                line.
                
                Extra blank lines may be used (sparingly) to separate groups of
                related functions.  Blank lines may be omitted between a bunch of
                related one-liners (e.g. a set of dummy implementations).
                
                Use blank lines in functions, sparingly, to indicate logical
                sections.
                
                Okay: def a():\n    pass\n\n\ndef b():\n    pass
                Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                Okay: default = 1\nfoo = 1
                Okay: classify = 1\nfoo = 1
                
                E301: class Foo:\n    b = 0\n    def bar():\n        pass
                E302: def a():\n    pass\n\ndef b(n):\n    pass
                E302: def a():\n    pass\n\nasync def b(n):\n    pass
                E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                E303: def a():\n\n\n\n    pass
                E304: @decorator\n\ndef a():\n    pass
                E305: def a():\n    pass\na()
                E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                Trailing whitespace
                Open

                        The last column is the label. 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        # remove first 2 columns on each features and label files -except the first one- 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (92 > 88 characters)
                Open

                        Generates a gzip from the csv file with all the features (doesn't include the label)

                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.

                Trailing whitespace
                Open

                    change_datetimes_on_metadata, 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (94 > 88 characters)
                Open

                        :param entity_date_table_name: name of table containing all valid entity ids and dates

                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.

                Line too long (89 > 88 characters)
                Open

                        # At this point, existence of matrix already tested, so no need to delete from db

                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.

                At least two spaces before inline comment
                Open

                            num_observations=row_count[0], #row count is a tuple

                Separate inline comments by at least two spaces.

                An inline comment is a comment on the same line as a statement.
                Inline comments should be separated by at least two spaces from the
                statement. They should start with a # and a single space.
                
                Each line of a block comment starts with a # and a single space
                (unless it is indented text inside the comment).
                
                Okay: x = x + 1  # Increment x
                Okay: x = x + 1    # Increment x
                Okay: # Block comment
                E261: x = x + 1 # Increment x
                E262: x = x + 1  #Increment x
                E262: x = x + 1  #  Increment x
                E265: #Block comment
                E266: ### Block comment

                Blank line contains whitespace
                Open

                            

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Trailing whitespace
                Open

                        # casting entity_id and as_of_date 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Too many blank lines (2)
                Open

                    def generate_gzip(self, path, matrix_uuid):

                Separate top-level function and class definitions with two blank lines.

                Method definitions inside a class are separated by a single blank
                line.
                
                Extra blank lines may be used (sparingly) to separate groups of
                related functions.  Blank lines may be omitted between a bunch of
                related one-liners (e.g. a set of dummy implementations).
                
                Use blank lines in functions, sparingly, to indicate logical
                sections.
                
                Okay: def a():\n    pass\n\n\ndef b():\n    pass
                Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                Okay: default = 1\nfoo = 1
                Okay: classify = 1\nfoo = 1
                
                E301: class Foo:\n    b = 0\n    def bar():\n        pass
                E302: def a():\n    pass\n\ndef b(n):\n    pass
                E302: def a():\n    pass\n\nasync def b(n):\n    pass
                E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                E303: def a():\n\n\n\n    pass
                E304: @decorator\n\ndef a():\n    pass
                E305: def a():\n    pass\na()
                E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                Module level import not at top of file
                Open

                import polars as pl

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Module level import not at top of file
                Open

                from triage.component.catwalk.storage import S3Store

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Line too long (100 > 88 characters)
                Open

                                    f"{self.db_config['labels_schema_name']}.{self.db_config['labels_table_name']}",

                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.

                Blank line contains whitespace
                Open

                        

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Blank line contains whitespace
                Open

                            

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Line too long (99 > 88 characters)
                Open

                        logger.debug(f"time to read csv of matrix with uuid {matrix_uuid} (sec): {(end-start)/60}")

                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.

                Trailing whitespace
                Open

                           cmd_line = 'rm ' + filename_ 

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                Module level import not at top of file
                Open

                import pandas as pd

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Module level import not at top of file
                Open

                from triage.util.pandas import downcast_matrix

                Place imports at the top of the file.

                Always put imports at the top of the file, just after any module
                comments and docstrings, and before module globals and constants.
                
                Okay: import os
                Okay: # this is a comment\nimport os
                Okay: '''this is a module docstring'''\nimport os
                Okay: r'''this is a module docstring'''\nimport os
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                Okay:
                try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                E402: a=1\nimport os
                E402: 'One string'\n"Two string"\nimport os
                E402: a=1\nfrom sys import x
                
                Okay: if x:\n    import os

                Line too long (101 > 88 characters)
                Open

                            f'Storing matrix {matrix_metadata["matrix_id"]} in {matrix_store.matrix_base_store.path}'

                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.

                Line too long (93 > 88 characters)
                Open

                            f"Extracting feature group data from database into file for matrix {matrix_uuid}"

                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.

                Blank line contains whitespace
                Open

                    

                Trailing whitespace is superfluous.

                The warning returned varies on whether the line itself is blank,
                for easier filtering for those who want to indent their blank lines.
                
                Okay: spam(1)\n#
                W291: spam(1) \n#
                W293: class Foo(object):\n    \n    bang = 12

                There are no issues that match your filters.

                Category
                Status