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 repairing currently failing tests pertaining to the `beartype.door` subpackage, recently implemented by Harvard microscopist and general genius @tlambert03 in PR #136. Specifically, this commit: * Renames `beartype.math` to `beartype.door`. N-n-now... hear me out here. I came up with a ludicrous acronym and we're going to have to learn to live with it: the **D**ecidedly **O**bject-**O**rientedly **R**ecursive (DOOR) API. Or, `beartype.door` for short. Open the door to a whole new type-hinting world, everyone. * Refactored `beartype_test.test_is_subtype` to defer unsafe instantiation of non-trivial global variables to test-time via `pytest` fixtures. * Shifted `beartype_test.test_is_subtype` to `beartype_test.a00_unit.a60_api.door.test_door` for disambiguity and testability. Since `beartype.door` remains critically broken under both Python 3.7 and 3.8, tests remain disabled until the Typing Doctor gets in. (*Hazardous hazmats are arduous!*)
- Loading branch information
Showing
10 changed files
with
709 additions
and
535 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3 | ||
# --------------------( LICENSE )-------------------- | ||
# Copyright (c) 2014-2022 Beartype authors. | ||
# See "LICENSE" for further details. | ||
|
||
''' | ||
**Beartype Decidedly Object-Orientedly Recursive (DOOR) API.** | ||
This subpackage provides an object-oriented type hint class hierarchy, | ||
encapsulating the crude non-object-oriented type hint declarative API | ||
standardized by the :mod:`typing` module. | ||
''' | ||
|
||
# ....................{ TODO }.................... | ||
#FIXME: Publicly document everything in "README.rst", please. *sigh* | ||
|
||
# ....................{ IMPORTS }.................... | ||
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
# WARNING: To avoid polluting the public module namespace, external attributes | ||
# should be locally imported at module scope *ONLY* under alternate private | ||
# names (e.g., "from argparse import ArgumentParser as _ArgumentParser" rather | ||
# than merely "from argparse import ArgumentParser"). | ||
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
from beartype.door._doorcls import ( | ||
TypeHint as TypeHint, | ||
is_subhint as is_subhint, | ||
) |
Oops, something went wrong.