Skip to content

Commit 893f3f4

Browse files
committed
fix: types and
1 parent 790dce6 commit 893f3f4

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
python-version: ${{ matrix.version }}
9090

9191
- name: Install dependencies and run tests
92-
timeout-minutes: 5
92+
timeout-minutes: 3
9393
run: |
9494
python -m venv python-ci-run
9595
source python-ci-run/bin/activate

algoliasearch_django/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class AlgoliaIndex(object):
5858
tags = None
5959

6060
# Use to specify the index to target on Algolia.
61-
index_name: str | None = None
61+
index_name: Optional[str] = None
6262

6363
# Use to specify the settings of the index.
6464
settings = None
@@ -395,7 +395,7 @@ def raw_search(self, query="", params=None):
395395
else:
396396
logger.warning("ERROR DURING SEARCH ON %s: %s", self.index_name, e)
397397

398-
def get_settings(self) -> dict | None:
398+
def get_settings(self) -> Optional[dict]:
399399
"""Returns the settings of the index."""
400400
try:
401401
logger.info("GET SETTINGS ON %s", self.index_name)

tox.ini

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ deps =
1414
six
1515
mock
1616
factory_boy
17-
ruff {[versions]ruff}
18-
pyright {[versions]pyright}
1917
py{38,313}: Faker>=5.0,<6.0
2018
django40: Django>=4.0,<4.1
2119
django41: Django>=4.1,<4.2
@@ -26,9 +24,6 @@ passenv =
2624
ALGOLIA*
2725
commands =
2826
pip3 install -r requirements.txt
29-
ruff check --fix --unsafe-fixes
30-
ruff format .
31-
pyright algoliasearch_django
3227
python runtests.py
3328

3429
[versions]
@@ -70,3 +65,13 @@ commands =
7065
python setup.py sdist bdist_wheel
7166
twine check dist/*
7267
twine upload -u {env:PYPI_USER} -p {env:PYPI_PASSWORD} --repository-url https://upload.pypi.org/legacy/ dist/*
68+
69+
[testenv:lint]
70+
deps =
71+
ruff {[versions]ruff}
72+
pyright {[versions]pyright}
73+
commands =
74+
pip3 install -r requirements.txt
75+
ruff check --fix --unsafe-fixes
76+
ruff format .
77+
pyright algoliasearch_django

0 commit comments

Comments
 (0)