-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 adding transparent support for the third-party `typing_extensions.Annotated` type hint back-ported to Python < 3.9, en route to resolving #34. Once finalized, this will enable usage of beartype validators under Python < 3.9 via this hint. Specifically, this commit continues disastrously breaking literally everything by continuing to disembowel the feckless `beartype._util.hint.data.pep.datapep` submodule and its untrustworthy `beartype._util.hint.data.pep.proposal` crony subpackage in favour of `beartype._util.hint.data.pep.sign`, which is the only subpackage left standing. Save us from our reckless selves, GitHub! (*Imponderable ponderosa!*)
- Loading branch information
Showing
9 changed files
with
198 additions
and
259 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python3 | ||
# --------------------( LICENSE )-------------------- | ||
# Copyright (c) 2014-2021 Beartype authors. | ||
# See "LICENSE" for further details. | ||
|
||
''' | ||
Project-wide **typing module globals** (i.e., global constants pertaining to | ||
modules declaring official PEP-compliant type hints). | ||
This private submodule is *not* intended for importation by downstream callers. | ||
''' | ||
|
||
# ....................{ IMPORTS }.................... | ||
# See the "beartype.cave" submodule for further commentary. | ||
__all__ = ['STAR_IMPORTS_CONSIDERED_HARMFUL'] | ||
|
||
# ....................{ TUPLES }.................... | ||
HINT_PEP_MODULE_NAMES = ('typing', 'typing_extensions') | ||
''' | ||
Tuple of the names of all **typing modules** (i.e., modules whose attributes | ||
are usable for creating PEP-compliant type hints officially accepted by both | ||
static and runtime type checkers) regardless of whether those modules are | ||
actually importable under the active Python interpreter. | ||
''' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
# --------------------( LICENSE )-------------------- | ||
# Copyright (c) 2014-2021 Beartype authors. | ||
# See "LICENSE" for further details. | ||
|
||
''' | ||
Project-wide **bare PEP-compliant type hint representations** (i.e., global | ||
constants pertaining to machine-readable strings returned by the :func:`repr` | ||
builtin suffixed by *no* "["- and "]"-delimited subscription representations). | ||
This private submodule is *not* intended for importation by downstream callers. | ||
''' | ||
|
||
# ....................{ IMPORTS }.................... | ||
from beartype._util.data.hint.pep.proposal.datapep484 import ( | ||
HINT_PEP484_BARE_ATTRS_DEPRECATED) | ||
|
||
# See the "beartype.cave" submodule for further commentary. | ||
__all__ = ['STAR_IMPORTS_CONSIDERED_HARMFUL'] | ||
|
||
# ....................{ SETS }.................... | ||
HINT_PEP_BARE_REPRS_DEPRECATED = ( | ||
HINT_PEP484_BARE_REPRS_DEPRECATED | ||
) | ||
''' | ||
Frozen set of all **bare deprecated PEP-compliant type hint representations** | ||
(i.e., machine-readable strings returned by the :func:`repr` builtin suffixed | ||
by *no* "["- and "]"-delimited subscription representations for all obsoleted | ||
hints, often by equivalent hints standardized under more recent PEPs). | ||
''' | ||
|
||
# ....................{ TUPLES }.................... | ||
HINT_PEP_MODULE_NAMES = ('typing', 'typing_extensions') | ||
''' | ||
Tuple of the names of all **typing modules** (i.e., modules declaring official | ||
PEP-compliant type hints) regardless of whether those modules are actually | ||
importable under the active Python interpreter. | ||
''' |
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
Oops, something went wrong.