-
-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid extra
.
in from .. import
parent imports in Rust Python dep…
… inference (Cherry-pick of #19175) (#19177) This fixes #19173 by generalising the `from . import a` special case to also handle `from .. import a` etc.: _any_ module path that ends with a `.` doesn't need an extra `.` to separate the module path from the name(s). Before this fix, `from . import a` was special cased to avoid an extra dot (becoming `.a` as desired), while `from .. import a` was not special cased. It became `...a` (extra `.`), by joining the module path (`..`) and the name (`a`) with the usual `.` separator. This separator is only appropriate for normal names like `from x import a`. Co-authored-by: Huon Wilson <huon@exoflare.io>
- Loading branch information
1 parent
1abb154
commit 6d1ebab
Showing
2 changed files
with
12 additions
and
5 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