-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
relative-beyond-top-level
false positive (#1186)
* Fix ``relative-beyond-top-level`` false positive
- Loading branch information
1 parent
1419ac5
commit 1437e73
Showing
7 changed files
with
34 additions
and
2 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
3 changes: 3 additions & 0 deletions
3
tests/testdata/python3/data/beyond_top_level/import_package.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from namespace_package import top_level_function | ||
|
||
top_level_function.do_something() |
5 changes: 5 additions & 0 deletions
5
...s/testdata/python3/data/beyond_top_level/namespace_package/lower_level/helper_function.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from ..plugin_api import top_message | ||
|
||
|
||
def plugin_message(msg): | ||
return "plugin_message: %s" % top_message(msg) |
2 changes: 2 additions & 0 deletions
2
tests/testdata/python3/data/beyond_top_level/namespace_package/plugin_api.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def top_message(msg): | ||
return "top_message: %s" % msg |
5 changes: 5 additions & 0 deletions
5
tests/testdata/python3/data/beyond_top_level/namespace_package/top_level_function.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .lower_level.helper_function import plugin_message | ||
|
||
|
||
def do_something(): | ||
return plugin_message("called by do_something") |
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