◐ Shell
clean mode source ↗

Buffer support for re by JelleZijlstra · Pull Request #7679 · python/typeshed

@JelleZijlstra

@github-actions

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]

@Akuli

Maybe we should update the third-party regex stubs too.

hauntsaninja

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

@JelleZijlstra

@hauntsaninja

JelleZijlstra added a commit to JelleZijlstra/typeshed that referenced this pull request

Apr 24, 2022

JelleZijlstra added a commit that referenced this pull request

May 10, 2022
Similar to #7679

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>