Skip to content

Commit

Permalink
Fix plaid lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsdarlingtower committed Apr 10, 2024
1 parent 6a83e6f commit 6d85ec3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plaid/auth_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def authorize(self) -> Response:
log.info(f"Fetched user info from token: {userinfo}")
user_email = userinfo['email'].lower()
if user_email.endswith('tartansolutions.com') or user_email.endswith('plaidcloud.com'):
role_set = ("Admin", "Plaid", "Gamma")
role_set = ["Admin", "Plaid", "Gamma"]
else:
role_set = ("Plaid", "Gamma")
role_set = ["Plaid", "Gamma"]
user = self.appbuilder.sm.find_user(email=userinfo['email'].lower())
name = userinfo.get('name', userinfo['preferred_username'])
if not user:
Expand Down
4 changes: 2 additions & 2 deletions plaid/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
help='Provide a SQLAlchemy URI to the server where the database '
'will be provisioned. Default is database.postgres setting '
'found in plaid.conf.')
def init_db(drop_existing, uri):
def init_db(drop_existing: bool, uri: str | None):
"""Provisions an empty postgres database with a 'superset' role to manage it."""
super_uri = ''

Expand Down Expand Up @@ -108,5 +108,5 @@ def init_db(drop_existing, uri):
logging.info('Granted future table and sequence privileges.')
con.close()
except:
logging.error(traceback.print_exc())
logging.error(traceback.format_exc())
con.close()

0 comments on commit 6d85ec3

Please sign in to comment.