mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 05:51:03 -05:00
Actually, rename TYP rules to TCH (#2176)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Tests to determine first-party import classification.
|
||||
|
||||
For typing-only import detection tests, see `TYC002.py`.
|
||||
For typing-only import detection tests, see `TCH002.py`.
|
||||
"""
|
||||
|
||||
|
||||
@@ -2,43 +2,43 @@
|
||||
|
||||
|
||||
def f():
|
||||
import pandas as pd # TYC002
|
||||
import pandas as pd # TCH002
|
||||
|
||||
x: pd.DataFrame
|
||||
|
||||
|
||||
def f():
|
||||
from pandas import DataFrame # TYC002
|
||||
from pandas import DataFrame # TCH002
|
||||
|
||||
x: DataFrame
|
||||
|
||||
|
||||
def f():
|
||||
from pandas import DataFrame as df # TYC002
|
||||
from pandas import DataFrame as df # TCH002
|
||||
|
||||
x: df
|
||||
|
||||
|
||||
def f():
|
||||
import pandas as pd # TYC002
|
||||
import pandas as pd # TCH002
|
||||
|
||||
x: pd.DataFrame = 1
|
||||
|
||||
|
||||
def f():
|
||||
from pandas import DataFrame # TYC002
|
||||
from pandas import DataFrame # TCH002
|
||||
|
||||
x: DataFrame = 2
|
||||
|
||||
|
||||
def f():
|
||||
from pandas import DataFrame as df # TYC002
|
||||
from pandas import DataFrame as df # TCH002
|
||||
|
||||
x: df = 3
|
||||
|
||||
|
||||
def f():
|
||||
import pandas as pd # TYC002
|
||||
import pandas as pd # TCH002
|
||||
|
||||
x: "pd.DataFrame" = 1
|
||||
|
||||
@@ -46,7 +46,7 @@ def f():
|
||||
def f():
|
||||
import pandas as pd
|
||||
|
||||
x = dict["pd.DataFrame", "pd.DataFrame"] # TYC002
|
||||
x = dict["pd.DataFrame", "pd.DataFrame"] # TCH002
|
||||
|
||||
|
||||
def f():
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Tests to determine standard library import classification.
|
||||
|
||||
For typing-only import detection tests, see `TYC002.py`.
|
||||
For typing-only import detection tests, see `TCH002.py`.
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import TYPE_CHECKING, List
|
||||
|
||||
if TYPE_CHECKING:
|
||||
pass # TYC005
|
||||
pass # TCH005
|
||||
|
||||
|
||||
def example():
|
||||
Reference in New Issue
Block a user