Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use absolute import qualified module name for deprecated module check (…
…#4678) * Use absolute import qualified module name for deprecated module check * Improved docstring of get_import_name
- Loading branch information
Showing
13 changed files
with
53 additions
and
22 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
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.
7 changes: 7 additions & 0 deletions
7
tests/functional/d/deprecated/deprecated_relative_import/dot_relative_import.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,7 @@ | ||
# pylint: disable=import-error, missing-module-docstring, unused-import | ||
|
||
# from import of stdlib optparse which should yield deprecated-module error | ||
from optparse import OptionParser # [deprecated-module] | ||
# from import of module internal optparse module inside this package. | ||
# This should not yield deprecated-module error | ||
from .optparse import Bar |
2 changes: 2 additions & 0 deletions
2
tests/functional/d/deprecated/deprecated_relative_import/dot_relative_import.rc
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 @@ | ||
[testoptions] | ||
min_pyver=3.2 |
1 change: 1 addition & 0 deletions
1
tests/functional/d/deprecated/deprecated_relative_import/dot_relative_import.txt
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 @@ | ||
deprecated-module:4:0::Uses of a deprecated module 'optparse':HIGH |
Empty file.
7 changes: 7 additions & 0 deletions
7
.../functional/d/deprecated/deprecated_relative_import/subpackage/dot_dot_relative_import.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,7 @@ | ||
# pylint: disable=import-error, unused-import, missing-module-docstring | ||
|
||
# from import of stdlib optparse which should yield deprecated-module error | ||
from optparse import OptionParser # [deprecated-module] | ||
# from import of module internal optparse module inside this package. | ||
# This should not yield deprecated-module error | ||
from ..optparse import Bar |
2 changes: 2 additions & 0 deletions
2
.../functional/d/deprecated/deprecated_relative_import/subpackage/dot_dot_relative_import.rc
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 @@ | ||
[testoptions] | ||
min_pyver=3.2 |
1 change: 1 addition & 0 deletions
1
...functional/d/deprecated/deprecated_relative_import/subpackage/dot_dot_relative_import.txt
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 @@ | ||
deprecated-module:4:0::Uses of a deprecated module 'optparse':HIGH |