-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Viewcode: Support import paths that differ from the directory structure #10766
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c851131
Improve module path finder
ProGamerGov 9e31cbf
Fix mistake
ProGamerGov c031675
Fix lint error
ProGamerGov 03b5572
" -> '
ProGamerGov d315dff
Fix mypy issue
ProGamerGov ae63186
Remove mypy ignore
ProGamerGov 84e17ff
Add tests
ProGamerGov 7ca7dbd
Fix test name
ProGamerGov a646bc4
Add changes to AUTHORS & CHANGES
ProGamerGov e97102c
Improve function readability
ProGamerGov 7a70ec5
NOQA -> noqa: F401
ProGamerGov 7612d09
Remove unnecessary lines
ProGamerGov cce55bb
Remove unnecessary commented out line
ProGamerGov df27026
Merge branch '5.x' into patch-2
ProGamerGov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
tests/roots/test-ext-viewcode-find-package/main_package/__init__.py
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| import main_package.subpackage as subpackage # NOQA | ||
| import main_package.subpackage as subpackage # noqa: F401 |
4 changes: 2 additions & 2 deletions
4
tests/roots/test-ext-viewcode-find-package/main_package/subpackage/__init__.py
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| from main_package.subpackage._subpackage2 import submodule # NOQA | ||
| from main_package.subpackage._subpackage2 import submodule # noqa: F401 | ||
|
|
||
| __all__ = ["submodule"] | ||
| __all__ = ["submodule"] | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| from .submodule import Class1, func1 # NOQA | ||
| from .submodule import Class1, func1 # noqa: F401 |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| from .mod1 import Class1, func1 # NOQA | ||
| from .mod2 import Class2, func2 # NOQA | ||
| from .mod1 import Class1, func1 # noqa: F401 | ||
| from .mod2 import Class2, func2 # noqa: F401 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.