mark some missing annotations as intentional

This commit is contained in:
Jan Petykiewicz 2024-07-28 20:14:55 -07:00
parent 62fc64c344
commit c48b427c77
3 changed files with 4 additions and 4 deletions

View File

@ -313,10 +313,10 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable):
self
"""
if sort_elements:
def maybe_sort(xx):
def maybe_sort(xx): # noqa:ANN001,ANN202
return sorted(xx)
else:
def maybe_sort(xx):
def maybe_sort(xx): # noqa:ANN001,ANN202
return xx
self.refs = defaultdict(list, sorted(

View File

@ -12,7 +12,7 @@ class AutoSlots(ABCMeta):
classes, they can have empty `__slots__` and their attribute type annotations
can be used to generate a full `__slots__` for the concrete class.
"""
def __new__(cls, name, bases, dctn):
def __new__(cls, name, bases, dctn): # noqa: ANN001,ANN204
parents = set()
for base in bases:
parents |= set(base.mro())

View File

@ -11,7 +11,7 @@ def oneshot(func: Callable) -> Callable:
expired = False
@wraps(func)
def wrapper(*args, **kwargs):
def wrapper(*args, **kwargs): # noqa: ANN202
nonlocal expired
if expired:
raise OneShotError(func.__name__)