diff --git a/comet_core/api.py b/comet_core/api.py index 1795937..8ceb85f 100644 --- a/comet_core/api.py +++ b/comet_core/api.py @@ -107,7 +107,7 @@ def create_app(self): app.register_blueprint(api_v0.bp) @app.route("/") - def health_check(): # pylint: disable=unused-variable + def health_check(): """Can be called by e.g. Kubernetes to verify that the API is up Returns: diff --git a/comet_core/api_helper.py b/comet_core/api_helper.py index 12dad7f..c560df3 100644 --- a/comet_core/api_helper.py +++ b/comet_core/api_helper.py @@ -48,7 +48,7 @@ def get_db(): DataStore: a request-scoped datastore instance """ if "db" not in g: - g.db = DataStore(current_app.config.get("database_uri")) + g.db = DataStore(current_app.config.get("database_uri")) # pylint: disable=assigning-non-slot return g.db @@ -60,12 +60,12 @@ def requires_auth(f): # pylint: disable=missing-return-doc,missing-return-type-doc def decorated(*args, **kwargs): auth_func = current_app.config.get("auth_func") - g.authorized_for = [] + g.authorized_for = [] # pylint: disable=assigning-non-slot if auth_func: res = auth_func() if isinstance(res, Response): return res - g.authorized_for = res + g.authorized_for = res # pylint: disable=assigning-non-slot return f(*args, **kwargs) LOG.warning("no auth function specified") return f(*args, **kwargs) diff --git a/comet_core/app.py b/comet_core/app.py index b693dab..d45119b 100644 --- a/comet_core/app.py +++ b/comet_core/app.py @@ -466,7 +466,7 @@ def process_unprocessed_events(self): events_to_remind = [] if source_type_config["communication_digest_mode"]: - if any([event.new for event in events]) or self.data_store.check_any_issue_needs_reminder( + if any(event.new for event in events) or self.data_store.check_any_issue_needs_reminder( owner_reminder_cadence, events ): events_to_remind = events diff --git a/comet_core/data_store.py b/comet_core/data_store.py index f87b8e1..4c57535 100644 --- a/comet_core/data_store.py +++ b/comet_core/data_store.py @@ -14,9 +14,6 @@ """Data Store module - interface to database.""" -# pylint: disable=no-member -# See: https://github.com/PyCQA/pylint/issues/3610 - from datetime import datetime, timedelta from sqlalchemy import create_engine diff --git a/requirements-dev.txt b/requirements-dev.txt index 3936990..089269a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ -black==20.8b1 -pytest==6.0.1 -pytest-cov==2.10.1 +black==21.5b2 +pytest==6.2.4 +pytest-cov==2.12.0 pytest-freezegun==0.4.2 -tox==3.20.0 -pylint==2.6.0 +tox==3.23.1 +pylint==2.8.3 diff --git a/setup.py b/setup.py index 04533de..5a1ff37 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setuptools.setup( name="comet-core", - version="2.8.2", + version="2.9.0", url="https://github.com/spotify/comet-core", author="Spotify Platform Security", author_email="wasabi@spotify.com", @@ -24,7 +24,7 @@ long_description=open("README.md", "r+", encoding="utf-8").read(), long_description_content_type="text/markdown", packages=["comet_core"], - install_requires=["Flask~=1.1", "Flask-Cors~=3.0", "python-json-logger~=0.1", "SQLAlchemy~=1.3"], + install_requires=["Flask~=2.0", "Flask-Cors~=3.0", "python-json-logger~=2.0", "SQLAlchemy~=1.4"], include_package_data=True, classifiers=[ "Development Status :: 5 - Production/Stable",