From b8eb0d37d83c1ca11758fde43a5c46a433dd4461 Mon Sep 17 00:00:00 2001 From: Michael H Date: Wed, 24 Jul 2024 07:26:52 -0400 Subject: [PATCH] remove 'reportCallInDefaultInitializer' rule --- async_utils/__init__.py | 2 +- async_utils/scheduler.py | 8 ++++++-- pyproject.toml | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/async_utils/__init__.py b/async_utils/__init__.py index 9dcb543..5fdd0aa 100644 --- a/async_utils/__init__.py +++ b/async_utils/__init__.py @@ -13,4 +13,4 @@ # limitations under the License. -__version__ = "5.0.0" +__version__ = "5.0.1" diff --git a/async_utils/scheduler.py b/async_utils/scheduler.py index 39a29a0..7b8f35e 100644 --- a/async_utils/scheduler.py +++ b/async_utils/scheduler.py @@ -18,11 +18,11 @@ from functools import total_ordering from time import time from types import TracebackType -from typing import Generic, TypeVar +from typing import Any, Generic, TypeVar __all__ = ("Scheduler",) - +MISSING: Any = object() T = TypeVar("T") @@ -55,6 +55,10 @@ class Scheduler(Generic[T]): def __init__(self, granularity: float, /): self.__granularity = granularity + self.__closed = MISSING + self.__tasks = MISSING + self.__tqueue = MISSING + self.__l = MISSING async def __aenter__(self): self.__closed = False diff --git a/pyproject.toml b/pyproject.toml index 846305e..a68a859 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ exclude = [ pythonVersion = "3.11" typeCheckingMode = "strict" pythonPlatform = "All" -reportCallInDefaultInitializer = "warning" reportImportCycles = "error" reportPropertyTypeMismatch = "error" reportShadowedImports = "error"