-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
133 additions
and
10 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
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
Empty file.
12 changes: 12 additions & 0 deletions
12
cpg-language-python/src/test/resources/python/packages/foobar/__main__.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,12 @@ | ||
# module foobar.implementation exports "foo" from foobar.implementation.internal_foo, | ||
# so we can directly import it | ||
from foobar.implementation import foo | ||
|
||
# bar is not exported in the package, so we need to import the specific module to | ||
# access it | ||
from foobar.implementation.internal_bar import bar | ||
|
||
bar() | ||
foo() | ||
|
||
print("Main!") |
2 changes: 2 additions & 0 deletions
2
cpg-language-python/src/test/resources/python/packages/foobar/config/__init__.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 @@ | ||
bar_string = "bar" | ||
foo_string = "foo" |
4 changes: 4 additions & 0 deletions
4
cpg-language-python/src/test/resources/python/packages/foobar/implementation/__init__.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,4 @@ | ||
# this also "exports" foo in this module | ||
from .internal_foo import foo | ||
|
||
foo() |
5 changes: 5 additions & 0 deletions
5
cpg-language-python/src/test/resources/python/packages/foobar/implementation/internal_bar.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 @@ | ||
import foobar.config | ||
|
||
def bar(): | ||
print(foobar.config.bar_string) | ||
pass |
5 changes: 5 additions & 0 deletions
5
cpg-language-python/src/test/resources/python/packages/foobar/implementation/internal_foo.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 ..config import foo_string | ||
|
||
def foo(): | ||
print(foo_string) | ||
pass |
Empty file.