diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c8da4aa..823e8152 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - - repo: https://github.com/myint/autoflake - rev: v1.4 + - repo: https://github.com/PyCQA/autoflake + rev: v2.0.0 hooks: - id: autoflake args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] @@ -12,7 +12,7 @@ repos: args: ["--profile", "black", "--filter-files"] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.4.0 hooks: - id: trailing-whitespace exclude: ^docs/.*|.*.md @@ -20,7 +20,7 @@ repos: exclude: ^docs/.*|.*.md - repo: https://github.com/psf/black - rev: 22.1.0 + rev: 22.10.0 hooks: - id: black language_version: python3 diff --git a/model_subscription/decorators.py b/model_subscription/decorators.py index 0bc91fe4..afa1078e 100644 --- a/model_subscription/decorators.py +++ b/model_subscription/decorators.py @@ -1,11 +1,8 @@ from functools import partial -from typing import Any, Callable, Optional, Type from django.conf import settings from model_subscription.constants import OperationType -from model_subscription.mixin import SubscriptionModelMixin -from model_subscription.types import T __all__ = [ "subscribe", diff --git a/model_subscription/observers.py b/model_subscription/observers.py index bd351de3..a7a0182b 100644 --- a/model_subscription/observers.py +++ b/model_subscription/observers.py @@ -1,8 +1,6 @@ import threading from abc import ABC, abstractmethod -from typing import Callable, Dict, List, NoReturn, Tuple, Union, overload - -from django.db import models +from typing import overload from model_subscription.constants import OperationType diff --git a/model_subscription/subscriber.py b/model_subscription/subscriber.py index 18cf4a58..433e74ca 100644 --- a/model_subscription/subscriber.py +++ b/model_subscription/subscriber.py @@ -1,8 +1,6 @@ from abc import ABC, abstractmethod -from typing import Any, Callable, FrozenSet, List, Optional, Tuple, Type, Union from django.conf import settings -from django.db import models from django.utils.module_loading import autodiscover_modules from model_subscription.constants import OperationType @@ -12,7 +10,6 @@ BulkUpdateObserver, CreateObserver, DeleteObserver, - Observer, UpdateObserver, )