-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is the next in a commit chain deeply type-checking **reiterables** (i.e., collections satisfying the `collections.abc.Collection` protocol with guaranteed `O(1)` read-only access to *only* the first collection item), en-route to *finally* resolving feature request #167 kindly submitted by the perennial brilliant @langfield (...*how I miss that awesome guy!*) several lifetimes ago back when I was probably a wandering vagabond Buddhist monk with a bad attitude, a begging bowl the size of my emaciated torso, and an honestly pretty cool straw hat that glinted dangerously in the firelight. Note that reiterables include *all* containers matched by one or more of the following PEP 484- or 585-compliant type hints: * `frozenset[...]`. * `set[...]`. * `collections.deque[...]`. * `collections.abc.Collection[...]`. * `collections.abc.KeysView[...]`. * `collections.abc.MutableSet[...]`. * `collections.abc.Set[...]`. * `collections.abc.ValuesView[...]`. * `typing.AbstractSet[...]`. * `typing.Collection[...]`. * `typing.Deque[...]`. * `typing.FrozenSet[...]`. * `typing.KeysView[...]`. * `typing.MutableSet[...]`. * `typing.Set[...]`. * `typing.ValuesView[...]`. Specifically, this commit continues reducing problematic DRY (Don't Repeat Yourself) violations in @beartype's internal type-checking code generator. (*Adriatic ranting on anti-fantastical aphantasia!*)
- Loading branch information
Showing
3 changed files
with
124 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters