Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruff, dependency upgrades #112

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Ruff, dependency upgrades #112

merged 2 commits into from
Feb 13, 2024

Conversation

dogversioning
Copy link
Contributor

This PR makes the following changes:

  • Adds ruff
  • Bumps python to 3.10, pandas to 2, awswrangler to 3
    • Some light tweaks to powerset merge due to different error handling behavior

pyproject.toml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
src/handlers/dashboard/filter_config.py Outdated Show resolved Hide resolved
src/handlers/dashboard/get_chart_data.py Outdated Show resolved Hide resolved
src/handlers/dashboard/get_chart_data.py Outdated Show resolved Hide resolved
@@ -28,7 +27,7 @@ def lambda_handler(event, context):
if auth_token not in user_db.keys() or auth_header[0] != "Basic":
raise AuthError
except (AuthError, KeyError):
raise AuthError(event) # pylint: disable=raise-missing-from
raise AuthError(event) # noqa: B904
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh I hate how less readable that lint-disable is. Is there a reason not to just do what the linter wants here and use from exc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because this is in the 'this code came directly from AWS and we're trying to leave that as much as found as possible' bin? you could talk me out of it.

Comment on lines +83 to +84
allowMethods = [] # noqa: RUF012
denyMethods = [] # noqa: RUF012
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are valid concerns? Very similar to using a container as a default kwarg - you'll be surprised later and should probably set these in __init__ (or use None as the default).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also in the 'this is AWS code verbatim' bucket. I can go check to see if there's an update over there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for posterity: not in the last three years, these vars are re-initialized in the init, i'm inclined to just leave it this way to keep matching the template.

src/handlers/site_upload/powerset_merge.py Show resolved Hide resolved
@dogversioning dogversioning merged commit 85c926d into main Feb 13, 2024
2 checks passed
@dogversioning dogversioning deleted the mg/ruff branch February 13, 2024 20:32
dogversioning added a commit that referenced this pull request Feb 22, 2024
* Ruff

* PR feedback, removed unused pylint excepts
dogversioning added a commit that referenced this pull request Feb 22, 2024
* Ruff

* PR feedback, removed unused pylint excepts
dogversioning added a commit that referenced this pull request Feb 22, 2024
* Ruff

* PR feedback, removed unused pylint excepts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants