diff --git a/.pylintrc b/.pylintrc index d9348b2..7b9da25 100644 --- a/.pylintrc +++ b/.pylintrc @@ -240,7 +240,7 @@ contextmanager-decorators=contextlib.contextmanager # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. # NOTE: We disable warnings for SQLAlchemy's query.filter/filter_by/join() methods. -generated-members=filter,join +generated-members=filter,join,session.query,session.add,session.commit # Tells whether missing members accessed in mixin class should be ignored. A # mixin class is detected if its name ends with "mixin" (case insensitive). diff --git a/Dockerfile b/Dockerfile index 84df730..f268192 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM centos:8 AS base # update packages and install Python RUN dnf -y upgrade-minimal && \ - dnf install -y python36 && \ + dnf install -y python38 && \ dnf clean all # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -13,13 +13,12 @@ RUN dnf -y upgrade-minimal && \ FROM base AS build # set up a virtualenv -RUN python3.6 -m venv /opt/venv +RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" RUN pip install --upgrade pip # install the application requirements COPY requirements.txt /tmp/ -RUN pip install --upgrade pip RUN pip install -r /tmp/requirements.txt # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/asl_articles/tests/test_import_roar_scenarios.py b/asl_articles/tests/test_import_roar_scenarios.py index 6da8ac4..6c8b1bb 100644 --- a/asl_articles/tests/test_import_roar_scenarios.py +++ b/asl_articles/tests/test_import_roar_scenarios.py @@ -8,7 +8,7 @@ from asl_articles.models import Scenario from asl_articles.tests.utils import init_tests sys.path.append( os.path.join( os.path.split(__file__)[0], "../../tools/" ) ) -from import_roar_scenarios import import_roar_scenarios +from import_roar_scenarios import import_roar_scenarios #pylint: disable=import-error,wrong-import-order # --------------------------------------------------------------------- diff --git a/asl_articles/utils.py b/asl_articles/utils.py index 314cf7c..0aebc52 100644 --- a/asl_articles/utils.py +++ b/asl_articles/utils.py @@ -85,7 +85,9 @@ def clean_html( val, allow_tags=None, safe_attrs=None ): #pylint: disable=too-ma # fixup smart quotes and dashes def replace_chars( val, ch, targets ): for t in targets: - if isinstance( t, typing.Pattern ): + # FUDGE! pylint is incorrectly flagging isinstance() when checking against typing.XXX. + # https://github.com/PyCQA/pylint/issues/3537 + if isinstance( t, typing.Pattern ): #pylint: disable=isinstance-second-argument-not-valid-type val = t.sub( ch, val ) else: assert isinstance( t, str ) diff --git a/conftest.py b/conftest.py index cd0fb6e..c660209 100644 --- a/conftest.py +++ b/conftest.py @@ -139,6 +139,7 @@ def webdriver( request ): options = wb.ChromeOptions() if headless: options.add_argument( "--headless" ) #pylint: disable=no-member + options.add_argument( "--disable-gpu" ) driver = wb.Chrome( options=options ) else: raise RuntimeError( "Unknown webdriver: {}".format( driver ) ) diff --git a/requirements-dev.txt b/requirements-dev.txt index 0620b1d..7d96d7f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -pytest==5.2.2 +pytest==6.2.1 selenium==3.141.0 -pylint==2.4.3 -pylint-flask-sqlalchemy==0.1.0 -pytest-pylint==0.14.1 +pylint==2.6.0 +pylint-flask-sqlalchemy==0.2.0 +pytest-pylint==0.18.0 diff --git a/requirements.txt b/requirements.txt index e9e4696..b792703 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ -# python 3.7.5 +# python 3.8.7 -flask==1.1.1 -flask-sqlalchemy==2.4.1 -psycopg2-binary==2.8.4 -alembic==1.3.1 -pyyaml==5.1.2 -lxml==4.4.2 +flask==1.1.2 +flask-sqlalchemy==2.4.4 +psycopg2-binary==2.8.6 +alembic==1.4.3 +pyyaml==5.3.1 +lxml==4.6.2