uktrade/directory-api

View on GitHub
company/search_filters.py

Summary

Maintainability
A
3 hrs
Test Coverage

File search_filters.py has 306 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from elasticsearch_dsl import analysis

companies_stopwords_filter = analysis.token_filter(
    'companies_stopwords', type='stop', stopwords=['limited', 'ltd', 'plc', 'llp', 'lp', 'rc', 'partnership', 'ngo']
)
Severity: Minor
Found in company/search_filters.py - About 3 hrs to fix

    Line too long (99 > 79 characters)
    Open

            "car park, parking area, parking ground, parking lot, parking-lot, parking place, parking",
    Severity: Minor
    Found in company/search_filters.py by pep8

    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 (80 > 79 characters)
    Open

            "loupe, magnifier, magnifying, magnifying glass, magnifying lens, zoom",
    Severity: Minor
    Found in company/search_filters.py by pep8

    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 (95 > 79 characters)
    Open

            "row house, serial house, terrace house, terraced house, terraced housing, town house",
    Severity: Minor
    Found in company/search_filters.py by pep8

    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 (103 > 79 characters)
    Open

            "christmas tree ball, christmas tree ball ornament, christmas ball ornament, christmas bauble",
    Severity: Minor
    Found in company/search_filters.py by pep8

    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 (116 > 79 characters)
    Open

        'companies_stopwords', type='stop', stopwords=['limited', 'ltd', 'plc', 'llp', 'lp', 'rc', 'partnership', 'ngo']
    Severity: Minor
    Found in company/search_filters.py by pep8

    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.

    There are no issues that match your filters.

    Category
    Status