Skip to content

Commit b6f5b5a

Browse files
committed
add a bad test case
1 parent b582792 commit b6f5b5a

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

crates/ruff_linter/resources/test/fixtures/pylint/import_private_name/submodule/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ class Class:
4444

4545
def __init__(self, arg: vv) -> "zz":
4646
pass
47+
48+
from foo. _bar import baz

crates/ruff_linter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLC2701_import_private_name__submodule____main__.py.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,12 @@ PLC2701 Private name import `_ddd` from external module `bbb.ccc`
7575
9 |
7676
10 | # Non-errors.
7777
|
78+
79+
PLC2701 Private name import `_bar` from external module `foo`
80+
--> __main__.py:48:10
81+
|
82+
46 | pass
83+
47 |
84+
48 | from foo. _bar import baz
85+
| ^^^^
86+
|

0 commit comments

Comments
 (0)