-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Buffer support for re #7679
Buffer support for re #7679
Conversation
Also showed up in python/mypy#12661. Replaces #7158. |
Diff from mypy_primer, showing the effect of this PR on open source code: paroxython (https://github.com/laowantong/paroxython)
+ paroxython/map_taxonomy.py:223: error: Argument 1 to "append" of "list" has incompatible type "str"; expected "TaxonName"
core (https://github.com/home-assistant/core)
+ homeassistant/components/huawei_lte/device_tracker.py:170: error: On Python 3 formatting "b'abc'" with "{}" produces "b'abc'", not "abc"; use "{!r}" if this is desired behavior [str-bytes-safe]
|
Maybe we should update the third-party |
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.
Thanks! The homeassistant one looks like a false positive to me, probably a mypy bug, although we should be able to work around it if we wanted by using self types for Match.group
@Akuli sure, I'll do that in a separate PR. @hauntsaninja yes that one is weird to me. Not sure where mypy gets bytes from in this code: https://github.com/home-assistant/core/blob/859dcb396a6f7a1712a188fc67060019aea24e9c/homeassistant/components/huawei_lte/device_tracker.py#L170. I don't understand how self types would help either. (Also, the paroxython one looks like a true positive. I don't know why mypy didn't catch it before.) |
I filed python/mypy#12666 for it |
Similar to python#7679
Similar to #7679 Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Akuli <akuviljanen17@gmail.com>
No description provided.