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

[BUG]: Linting raises library-not-found problem when import type_extensions #1707

Closed
1 task done
JCZuurmond opened this issue May 16, 2024 · 1 comment · Fixed by #1746
Closed
1 task done

[BUG]: Linting raises library-not-found problem when import type_extensions #1707

JCZuurmond opened this issue May 16, 2024 · 1 comment · Fixed by #1746
Labels
migrate/python Pull requests that update Python code

Comments

@JCZuurmond
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

We raise a library-not-found problem when import type_extentions

if TYPE_CHECKING:
    from typing_extensions import ParamSpec

    P = ParamSpec("P")

Expected Behavior

No problem should be raised. Maybe we should white list this library

Steps To Reproduce

  1. Create unit test for above code snippet

Cloud

Azure

Operating System

macOS

Version

latest via Databricks CLI

Relevant log output

No response

@ericvergnaud
Copy link
Contributor

ericvergnaud commented May 17, 2024

This happens when PathLookup is a mock because then it doesn't find typing_extensions.py.
Added a test in #1709

@nfx nfx added migrate/python Pull requests that update Python code and removed needs-triage labels May 21, 2024
@nfx nfx closed this as completed in #1746 May 23, 2024
nfx pushed a commit that referenced this issue May 23, 2024
## Changes
Remove chain of import resolvers in favor of a single resolver.

Supersedes #1709 

Resolves #1707

---------

Co-authored-by: Eric Vergnaud <eic.vergnaud@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrate/python Pull requests that update Python code
Projects
3 participants