Open kanhebei opened 1 month ago
Attention: Patch coverage is 64.70588%
with 6 lines
in your changes are missing coverage. Please review.
Project coverage is 99.21%. Comparing base (
fa5bb5d
) to head (da8b518
). Report is 15 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/flask_smorest/__init__.py | 64.70% | 3 Missing and 3 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I get your point.
This is not strictly needed. See for instance in this app how we register blueprints after initializing api
: https://github.com/BEMServer/bemserver-api/blob/main/src/bemserver_api/__init__.py. But I don't mind adding this.
Regarding importing as string, I don't mind either. Since the work is done in werkzeug, it is not too much API surface added.
Don't bother adding type hints. There is no CI check for them yet. However, anyone is welcome to add type hints to the code base in another PR.
I'd move the part that does the registration to a dedicated _register_blueprint
method that would be called at __init__
(no need to call import_string
and check self._app
at this stage). Not a performance issue, but to make the intent clear.
The original
After the update, there are no issues with the above two writing methods, and the following new usage methods will continue to be added