Improve PIE794 autofix behavior (#1794)

We now: (1) trigger PIE794 for objects without bases (not sure why this
was omitted before); and (2) remove the entire line, rather than leaving
behind trailing whitespace.

Resolves #1787.
This commit is contained in:
Charlie Marsh
2023-01-11 18:01:29 -05:00
committed by GitHub
parent a3fcc3b28d
commit 4e97e9c7cf
4 changed files with 60 additions and 22 deletions

View File

@@ -31,3 +31,10 @@ class User(BaseModel):
@buzz.setter
def buzz(self, value: str | int) -> None:
...
class User:
bar: str = StringField()
foo: bool = BooleanField()
# ...
bar = StringField() # PIE794