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

Improve view functions in facilities blueprint #658

Merged
merged 22 commits into from
Aug 16, 2023

Conversation

lukasjuhrich
Copy link
Collaborator

@lukasjuhrich lukasjuhrich commented Aug 11, 2023

  • Upgrades to flask~=2.3 (and werkzeug>=2.0)
  • Improves the handle_errors context manager for more ergonomic usage (the try can be omitted, session.begin_nested needs to be called explicitly
  • enforces stricter typing rules for the facilities blueprint
  • Adds type hints to flask view functions across the board. This prevents stpuid bugs like forgetting to call .model_dump on a pydantic model.
  • Enforces the latter via a semgrep rule.

web/app.py Outdated Show resolved Hide resolved
@lukasjuhrich lukasjuhrich force-pushed the facilities_improvements branch 2 times, most recently from 8e63e4e to c5f02d0 Compare August 11, 2023 18:04
@lukasjuhrich lukasjuhrich mentioned this pull request Aug 11, 2023
@lukasjuhrich lukasjuhrich marked this pull request as draft August 11, 2023 18:05
@lukasjuhrich lukasjuhrich changed the base branch from develop to flask_23 August 11, 2023 18:06
@lukasjuhrich lukasjuhrich force-pushed the flask_23 branch 2 times, most recently from 210c90c to 534c0b8 Compare August 14, 2023 16:32
@lukasjuhrich lukasjuhrich force-pushed the facilities_improvements branch 2 times, most recently from f13afde to 614369f Compare August 14, 2023 16:55
@lukasjuhrich lukasjuhrich changed the base branch from flask_23 to develop August 14, 2023 16:55
Now, after v1, compat release pinning makes sense.
Also, remove the keyword argument in some invocations; it has been
introduced before when the first argument was `session`.  This is now
more noise than it is helpful.
@lukasjuhrich lukasjuhrich marked this pull request as ready for review August 16, 2023 10:58
@lukasjuhrich lukasjuhrich merged commit 9cdffb0 into develop Aug 16, 2023
7 checks passed
@lukasjuhrich lukasjuhrich deleted the facilities_improvements branch September 6, 2023 19:11
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.

1 participant