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

Add __contains__ to MapKeys #99

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Add __contains__ to MapKeys #99

merged 1 commit into from
Jul 21, 2023

Conversation

msullivan
Copy link
Contributor

I ran into this when I tried to pass .keys() to something declared
to take a Collection, and it failed because it lacked
__contains__. (I didn't actually care about __contains__, but mypy
did.)

So I came to add it to the stubs and discovered that it was actually
missing, and since the fallback is woefully slow I went and
implemented it.

I ran into this when I tried to pass `.keys()` to something declared
to take a `Collection`, and it failed because it lacked
`__contains__`. (I didn't actually care about `__contains__`, but mypy
did.)

So I came to add it to the stubs and discovered that it *was* actually
missing, and since the fallback is woefully slow I went and
implemented it.
@elprans elprans merged commit 6790111 into master Jul 21, 2023
21 checks passed
@elprans elprans deleted the keys branch July 21, 2023 22:58
elprans added a commit that referenced this pull request Aug 14, 2023
Changes
=======

* Enable support for pattern matching (#96)
  (by @antonagestam in 7071a24 for #96)

* add support for aix/sunos (#98)
  (by @mattp- in 765e4ee for #98)

* Python 3.12 compatibility (#105)
  (by @elprans in f797822 for #105)

* Add __contains__ to MapKeys (#99)
  (by @msullivan in 6790111 for #99)

* Add PEP 585 GenericAlias support (#101)
  (by @eltoder in 9ce64c5 for #101)

* Move metadata to `pyproject.toml`, fix test fixture inclusion in sdist (#111)
  (by @elprans in ea65656 for #111)
elprans added a commit that referenced this pull request Aug 14, 2023
Changes
=======

* Enable support for pattern matching (#96)
  (by @antonagestam in 7071a24 for #96)

* add support for aix/sunos (#98)
  (by @mattp- in 765e4ee for #98)

* Python 3.12 compatibility (#105)
  (by @elprans in f797822 for #105)

* Add __contains__ to MapKeys (#99)
  (by @msullivan in 6790111 for #99)

* Add PEP 585 GenericAlias support (#101)
  (by @eltoder in 9ce64c5 for #101)

* Move metadata to `pyproject.toml`, fix test fixture inclusion in sdist (#111)
  (by @elprans in ea65656 for #111)
@elprans elprans mentioned this pull request Aug 14, 2023
elprans added a commit that referenced this pull request Aug 14, 2023
Changes
=======

* Enable support for pattern matching (#96)
  (by @antonagestam in 7071a24 for #96)

* add support for aix/sunos (#98)
  (by @mattp- in 765e4ee for #98)

* Python 3.12 compatibility (#105)
  (by @elprans in f797822 for #105)

* Add __contains__ to MapKeys (#99)
  (by @msullivan in 6790111 for #99)

* Add PEP 585 GenericAlias support (#101)
  (by @eltoder in 9ce64c5 for #101)

* Move metadata to `pyproject.toml`, fix test fixture inclusion in sdist (#111)
  (by @elprans in ea65656 for #111)
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.

None yet

2 participants