-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add relative-path tests for
banned-api
(#4033)
- Loading branch information
1 parent
25a6bfa
commit eed6866
Showing
18 changed files
with
63 additions
and
13 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 0 additions & 11 deletions
11
crates/ruff/resources/test/fixtures/flake8_tidy_imports/TID251_false_positives.py
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
...ts/snapshots/ruff__rules__flake8_tidy_imports__banned_api__tests__banned_api_package.snap
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,31 @@ | ||
--- | ||
source: crates/ruff/src/rules/flake8_tidy_imports/banned_api.rs | ||
--- | ||
application.py:3:8: TID251 `attrs` is banned: The attrs module is deprecated. | ||
| | ||
3 | from typing import TYPE_CHECKING, Any, ClassVar | ||
4 | | ||
5 | import attrs | ||
| ^^^^^ TID251 | ||
6 | | ||
7 | from ....import unknown | ||
| | ||
|
||
application.py:6:1: TID251 `my_package.sublib.protocol` is banned: The protocol module is deprecated. | ||
| | ||
6 | from ....import unknown | ||
7 | from ..protocol import commands, definitions, responses | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID251 | ||
8 | from ..server import example | ||
9 | from .. import server | ||
| | ||
|
||
application.py:10:1: TID251 `my_package.sublib.protocol` is banned: The protocol module is deprecated. | ||
| | ||
10 | from .. import server | ||
11 | from . import logger, models | ||
12 | from ..protocol.UpperCaseModule import some_function | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TID251 | ||
| | ||
|
||
|