Showing 121 of 349 total issues

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

def deploy(ctx, space=None, branch=None, login=None, yes=False):
Severity: Minor
Found in tasks.py - About 35 mins to fix

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

    def generic_query_builder(q, type_, from_hit, hits_returned, **kwargs):
    Severity: Minor
    Found in webservices/resources/legal.py - About 35 mins to fix

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

      def make_multi_sort_args(default=None, validator=None, default_hide_null=False, default_reverse_nulls=True,
      Severity: Minor
      Found in webservices/args.py - About 35 mins to fix

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

        def filter_election(query, kwargs, candidate_column, cycle_column=None, year_column=None):
        Severity: Minor
        Found in webservices/filters.py - About 35 mins to fix

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

          def mur_query_builder(q, type_, from_hit, hits_returned, **kwargs):
          Severity: Minor
          Found in webservices/resources/legal.py - About 35 mins to fix

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

            def fetch_subset(ctx, source, dest, fraction=DEFAULT_FRACTION, log=True):
            Severity: Minor
            Found in tasks.py - About 35 mins to fix

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

              def build_test(ctx, source, dest, fraction=DEFAULT_FRACTION, log=True):
              Severity: Minor
              Found in tasks.py - About 35 mins to fix

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

                def ao_query_builder(q, type_, from_hit, hits_returned, **kwargs):
                Severity: Minor
                Found in webservices/resources/legal.py - About 35 mins to fix

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

                  def parse_option(option, model=None, aliases=None, join_columns=None, query=None):
                  Severity: Minor
                  Found in webservices/sorting.py - About 35 mins to fix

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

                        def __init__(self, cursor, per_page, index_column, sort_column=None, count=None):
                    Severity: Minor
                    Found in webservices/utils.py - About 35 mins to fix

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

                      def make_sort_args(default=None, validator=None, default_hide_null=False, default_reverse_nulls=True,
                      Severity: Minor
                      Found in webservices/args.py - About 35 mins to fix

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

                          initialize: function(options) {
                            options = options || {};
                            if(!options.highlightSizeThreshold) {
                              options.highlightSizeThreshold = 100000;
                            }
                        Severity: Minor
                        Found in swagger-ui/js/SwaggerUi.js - 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 document_description has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def document_description(report_year, report_type=None, document_type=None, form_type=None):
                            if report_type:
                                clean = re.sub(r'\{[^)]*\}', '', report_type)
                            elif document_type:
                                clean = document_type
                        Severity: Minor
                        Found in webservices/utils.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 extract_summary_rows has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def extract_summary_rows(self, obj):
                                if obj.get('summary_lines'):
                                    for key, value in obj.get('summary_lines').items():
                                        #may be a way to pull these out using pandas?
                                        if key == 'nan':
                        Severity: Minor
                        Found in webservices/schemas.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 filter_match has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                        def filter_match(query, kwargs, fields):
                            for key, column in fields:
                                if kwargs.get(key) is not None:
                                    if is_exclude_arg(kwargs[key]):
                                        query = query.filter(sa.or_(column != parse_exclude_arg(kwargs[key]),
                        Severity: Minor
                        Found in webservices/filters.py - About 35 mins to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Avoid too many return statements within this function.
                        Open

                              return this.renderer.table(header, body);
                        Severity: Major
                        Found in static/swagger-ui/vendor/marked.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                return this.renderer.blockquote(body);
                          Severity: Major
                          Found in static/swagger-ui/vendor/marked.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return this.renderer.listitem(body);
                            Severity: Major
                            Found in static/swagger-ui/vendor/marked.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                        return Handlebars.templates.param;
                              Severity: Major
                              Found in swagger-ui/js/view/ParameterView.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      return this.renderer.paragraph(this.inline.output(this.token.text));
                                Severity: Major
                                Found in static/swagger-ui/vendor/marked.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language