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

Improve Type Checking Support #3425

Merged
merged 1 commit into from
May 2, 2022
Merged

Improve Type Checking Support #3425

merged 1 commit into from
May 2, 2022

Commits on May 2, 2022

  1. Prevent lazy import when type checking

    This checks whether type checking is being done, and if so, disables the
    lazy import as this is generally not supported by type checkers.  This
    should not have any impact on the runtime performance as the lazy import
    should still be used at runtime.
    
    This is achieved by inspecting the
    [`TYPE_CHECKING`](https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING)
    variable.
    
    This should resolve issue #1682 and provide a temporary workaround for
    issue #1103.  In the latter case, the addition of stubs would probably
    still be an improvement as I believe this would be faster.
    
    Signed-off-by: JP-Ellis <josh@jpellis.me>
    JP-Ellis committed May 2, 2022
    Configuration menu
    Copy the full SHA
    0c130bb View commit details
    Browse the repository at this point in the history