From c48b427c7741a5bb9c208c98679439337e647d99 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 28 Jul 2024 20:14:55 -0700 Subject: [PATCH] mark some missing annotations as intentional --- masque/pattern.py | 4 ++-- masque/utils/autoslots.py | 2 +- masque/utils/decorators.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/masque/pattern.py b/masque/pattern.py index 74e5e0f..e500d1d 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -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( diff --git a/masque/utils/autoslots.py b/masque/utils/autoslots.py index 8b60897..e82d3db 100644 --- a/masque/utils/autoslots.py +++ b/masque/utils/autoslots.py @@ -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()) diff --git a/masque/utils/decorators.py b/masque/utils/decorators.py index 9ae7650..eb81a1d 100644 --- a/masque/utils/decorators.py +++ b/masque/utils/decorators.py @@ -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__)