-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Improve lazy imports syntax errors #150459
Copy link
Copy link
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-lazy-importstopic-parsertype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-lazy-importstopic-parsertype-featureA feature request or enhancementA feature request or enhancement
Fields
Give feedbackNo fields configured for issues without a type.
Feature or enhancement
Currently there are several cases that can be improved when there are syntax errors in the code.
The most important one in my opinion is
from os lazy import path.This is the problem many people have shared with me already. It is an easy-to-catch one.
Currently it does not have any specific error message.
Next, these two are optional, but in my opinion are also quite helpful:
lazy os(missingimport) andlazy os import path(missingfrom).I will send a PR :)