|
| 1 | +--- |
| 2 | +source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs |
| 3 | +--- |
| 4 | +--- Linter settings --- |
| 5 | +-linter.preview = disabled |
| 6 | ++linter.preview = enabled |
| 7 | + |
| 8 | +--- Summary --- |
| 9 | +Removed: 0 |
| 10 | +Added: 11 |
| 11 | + |
| 12 | +--- Added --- |
| 13 | +PYI033 Don't use type comments |
| 14 | + --> PYI033.py:6:22 |
| 15 | + | |
| 16 | +4 | from typing import TypeAlias |
| 17 | +5 | |
| 18 | +6 | A: TypeAlias = None # type: int # error |
| 19 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 20 | +7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # error |
| 21 | +8 | C: TypeAlias = None #type: int # error |
| 22 | + | |
| 23 | + |
| 24 | + |
| 25 | +PYI033 Don't use type comments |
| 26 | + --> PYI033.py:7:22 |
| 27 | + | |
| 28 | +6 | A: TypeAlias = None # type: int # error |
| 29 | +7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # error |
| 30 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 31 | +8 | C: TypeAlias = None #type: int # error |
| 32 | +9 | D: TypeAlias = None # type: int # error |
| 33 | + | |
| 34 | + |
| 35 | + |
| 36 | +PYI033 Don't use type comments |
| 37 | + --> PYI033.py:8:22 |
| 38 | + | |
| 39 | + 6 | A: TypeAlias = None # type: int # error |
| 40 | + 7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # error |
| 41 | + 8 | C: TypeAlias = None #type: int # error |
| 42 | + | ^^^^^^^^^^^^^^^^^^^ |
| 43 | + 9 | D: TypeAlias = None # type: int # error |
| 44 | +10 | E: TypeAlias = None# type: int # error |
| 45 | + | |
| 46 | + |
| 47 | + |
| 48 | +PYI033 Don't use type comments |
| 49 | + --> PYI033.py:9:22 |
| 50 | + | |
| 51 | + 7 | B: TypeAlias = None # type: str # And here's an extra comment about why it's that type # error |
| 52 | + 8 | C: TypeAlias = None #type: int # error |
| 53 | + 9 | D: TypeAlias = None # type: int # error |
| 54 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 55 | +10 | E: TypeAlias = None# type: int # error |
| 56 | +11 | F: TypeAlias = None#type:int # error |
| 57 | + | |
| 58 | + |
| 59 | + |
| 60 | +PYI033 Don't use type comments |
| 61 | + --> PYI033.py:10:20 |
| 62 | + | |
| 63 | + 8 | C: TypeAlias = None #type: int # error |
| 64 | + 9 | D: TypeAlias = None # type: int # error |
| 65 | +10 | E: TypeAlias = None# type: int # error |
| 66 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 67 | +11 | F: TypeAlias = None#type:int # error |
| 68 | + | |
| 69 | + |
| 70 | + |
| 71 | +PYI033 Don't use type comments |
| 72 | + --> PYI033.py:11:20 |
| 73 | + | |
| 74 | + 9 | D: TypeAlias = None # type: int # error |
| 75 | +10 | E: TypeAlias = None# type: int # error |
| 76 | +11 | F: TypeAlias = None#type:int # error |
| 77 | + | ^^^^^^^^^^^^^^^^^^ |
| 78 | +12 | |
| 79 | +13 | def func( |
| 80 | + | |
| 81 | + |
| 82 | + |
| 83 | +PYI033 Don't use type comments |
| 84 | + --> PYI033.py:14:12 |
| 85 | + | |
| 86 | +13 | def func( |
| 87 | +14 | arg1, # type: dict[str, int] # error |
| 88 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 89 | +15 | arg2 # type: Sequence[bytes] # And here's some more info about this arg # error |
| 90 | +16 | ): ... |
| 91 | + | |
| 92 | + |
| 93 | + |
| 94 | +PYI033 Don't use type comments |
| 95 | + --> PYI033.py:15:11 |
| 96 | + | |
| 97 | +13 | def func( |
| 98 | +14 | arg1, # type: dict[str, int] # error |
| 99 | +15 | arg2 # type: Sequence[bytes] # And here's some more info about this arg # error |
| 100 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 101 | +16 | ): ... |
| 102 | + | |
| 103 | + |
| 104 | + |
| 105 | +PYI033 Don't use type comments |
| 106 | + --> PYI033.py:19:29 |
| 107 | + | |
| 108 | +18 | class Foo: |
| 109 | +19 | Attr: TypeAlias = None # type: set[str] # error |
| 110 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 111 | +20 | |
| 112 | +21 | G: TypeAlias = None # type: ignore |
| 113 | + | |
| 114 | + |
| 115 | + |
| 116 | +PYI033 Don't use type comments |
| 117 | + --> PYI033.py:29:22 |
| 118 | + | |
| 119 | +28 | # Whole line commented out # type: int |
| 120 | +29 | M: TypeAlias = None # type: can't parse me! |
| 121 | + | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 122 | +30 | |
| 123 | +31 | class Bar: |
| 124 | + | |
| 125 | + |
| 126 | + |
| 127 | +PYI033 Don't use type comments |
| 128 | + --> PYI033.py:32:26 |
| 129 | + | |
| 130 | +31 | class Bar: |
| 131 | +32 | N: TypeAlias = None # type: can't parse me either! |
| 132 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 133 | +33 | # This whole line is commented out and indented # type: str |
| 134 | + | |
0 commit comments