Skip to content

Commit

Permalink
chore: ignore at the correct spot
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Nov 27, 2024
1 parent 4a5d054 commit d4b2085
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions algoliasearch_django/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ def __init__(self, model=None):
def __enter__(self):
for model in self.models:
post_save.disconnect(
algolia_engine._AlgoliaEngine__post_save_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__post_save_receiver, # pyright: ignore
sender=model,
)
pre_delete.disconnect(
algolia_engine._AlgoliaEngine__pre_delete_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__pre_delete_receiver, # pyright: ignore
sender=model,
)

def __exit__(self, exc_type, exc_value, traceback):
for model in self.models:
post_save.connect(
algolia_engine._AlgoliaEngine__post_save_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__post_save_receiver, # pyright: ignore
sender=model,
)
pre_delete.connect(
algolia_engine._AlgoliaEngine__pre_delete_receiver,
sender=model, # pyright: ignore
algolia_engine._AlgoliaEngine__pre_delete_receiver, # pyright: ignore
sender=model,
)
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
],
)
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ envlist =
{py310,py311,py312,py313}-django51
coverage
skip_missing_interpreters = True
allowlist_externals = True

[testenv]
deps =
Expand All @@ -33,7 +32,7 @@ ruff = >=0.7.4,<1.0
pyright = >=1.1.389,<2.0

[testenv:coverage]
basepython = python3.11
basepython = python3.13
deps = coverage
passenv =
ALGOLIA*
Expand All @@ -42,7 +41,7 @@ commands =
coverage report

[testenv:coveralls]
basepython = python3.11
basepython = python3.13
deps =
coverage
coveralls
Expand All @@ -54,7 +53,7 @@ commands =
coveralls

[testenv:release]
basepython = python3.11
basepython = python3.13
deps =
twine {[versions]twine}
wheel {[versions]wheel}
Expand Down

0 comments on commit d4b2085

Please sign in to comment.