Fix SLOT000 (subclasses of str should define `__slots__`)

This commit is contained in:
Adam Turner 2023-08-13 22:32:12 +01:00
parent 6f3c5b8a2c
commit e73300b829
2 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,6 @@ ignore = [
"SIM117", # use single 'with' statement
"SIM118", # use key in dict not key in dict.keys()
# flake8-slots
"SLOT000", # Subclasses of str should define __slots__
"SLOT002", # Subclasses of collections.namedtuple() should define __slots__
# flake8-self
"SLF001", # private member accessed

View File

@ -34,6 +34,8 @@ class path(str):
Represents a path which behaves like a string.
"""
__slots__ = ()
@property
def parent(self) -> path:
"""