Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc26dde7 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

Update pep8 tools to pycodestyle

pep8 is deprecated, it is replaced by pycodestyle.
parent bbb5e68b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -35,7 +35,8 @@ pep8_check() {
    # ignored rules:
    #  E402 module level import not at top of file
    #  W503 line break before binary operator
    pep8 --exclude=searx/static --max-line-length=120 --ignore "E402,W503" "$SEARX_DIR" "$BASE_DIR/tests"
    #  E722 do not use bare 'except'
    pycodestyle --exclude=searx/static --max-line-length=120 --ignore "E402,W503,E722" "$SEARX_DIR" "$BASE_DIR/tests"
}

unit_tests() {
+1 −1
Original line number Diff line number Diff line
babel==2.3.4
mock==2.0.0
pep8==1.7.0
pycodestyle==2.4.0
mockredispy==2.9.3
pytest==4.1.0
pytest-cov==2.6.1
+2 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ from io import open
from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION
try:
    from yaml import load
except:
except ImportError:
    from sys import exit, stderr
    stderr.write('[E] install pyyaml\n')
    exit(2)
@@ -38,6 +38,7 @@ def check_settings_yml(file_name):
    else:
        return None


# find location of settings.yml
if 'SEARX_SETTINGS_PATH' in environ:
    # if possible set path to settings using the
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ def _fetch_supported_languages(resp):

    regions = dom.xpath(regions_xpath)
    for region in regions:
        code = re.search('setmkt=[^\&]+', region).group()[7:]
        code = re.search('setmkt=[^&]+', region).group()[7:]
        if code == 'nb-NO':
            code = 'no-NO'

+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ def parse_album(hit):
            result.update({'content': 'Released: {}'.format(year)})
    return result


parse = {'lyric': parse_lyric, 'song': parse_lyric, 'artist': parse_artist, 'album': parse_album}


Loading