From 7f7ad7082e66da2348b67124c1a399b3345b84bb Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Tue, 17 Aug 2021 02:02:20 -0400 Subject: [PATCH 1/2] Ignore abstract-class-instantiated for sentry init Resolves #284 --- packet/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packet/__init__.py b/packet/__init__.py index f011573..82e2119 100644 --- a/packet/__init__.py +++ b/packet/__init__.py @@ -78,6 +78,7 @@ app.logger.info('OIDCAuth configured') # Sentry +# pylint: disable=abstract-class-instantiated sentry_sdk.init( dsn=app.config['SENTRY_DSN'], integrations=[FlaskIntegration(), SqlalchemyIntegration()] From fe708ca10178b656bd53cac0e40b92d44fb35867 Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Tue, 17 Aug 2021 01:35:12 -0400 Subject: [PATCH 2/2] Add `packet/routes` to pylint in ci Fixes the pylint command introduced in 881dbc88, as well as a lint error introduced in c10fd589. --- .github/workflows/python-app.yml | 2 +- packet/routes/api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3934f40..29dc65f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -31,7 +31,7 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with pylint run: | - pylint packet + pylint packet/routes packet typecheck: runs-on: ubuntu-latest diff --git a/packet/routes/api.py b/packet/routes/api.py index 38046e4..21d9f0d 100644 --- a/packet/routes/api.py +++ b/packet/routes/api.py @@ -210,8 +210,8 @@ def upperclassman_stats(uid): @app.route('/readiness') def readiness() -> tuple[str, int]: - '''A basic healthcheck. Returns 200 to indicate flask is running''' - return "ready", 200 + """A basic healthcheck. Returns 200 to indicate flask is running""" + return 'ready', 200 def commit_sig(packet, was_100, uid):