-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix typing on set_cookie #3836
fix typing on set_cookie #3836
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3836 +/- ##
==========================================
- Coverage 97.96% 97.95% -0.01%
==========================================
Files 43 43
Lines 8584 11430 +2846
Branches 1372 2256 +884
==========================================
+ Hits 8409 11196 +2787
- Misses 71 135 +64
+ Partials 104 99 -5
Continue to review full report at Codecov.
|
Please fix CI, mypy linter is failed |
in my humble opinion that is a bug in typeshed and opened it there: python/typeshed#3059 |
Thank you for the PR. |
The upstream bug is fixed in MyPy 0.720 as it pulls in typeched f5c107cacd7c17ef541278bf228ca411fdeaa11b |
@FlorianLudwig the checks should pass before merging. |
6afef0f
to
f25078c
Compare
@webknjaz Bumping mypy to 0.720 is needed - which results in other new linting errors (see travis). I can check those later, maybe over the weekend |
Please do |
@@ -170,8 +170,8 @@ def set_cookie(self, name: str, value: str, *, | |||
max_age: Optional[Union[int, str]]=None, | |||
path: str='/', | |||
secure: Optional[str]=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about secure
?
httponly: Optional[str]=None, | ||
version: Optional[str]=None) -> None: | ||
httponly: Optional[bool]=None, | ||
version: Optional[bool]=None) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is version
really a boolean?
@FlorianLudwig would you sync the PR with the latest master? |
And, if the current tests are passed with updated MyPy, would be nice to add tests for |
What do these changes do?
Change type hints on
set_cookie
to match the existing documentationAre there changes in behavior for the user?
For users that use linting, yes.
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.