Skip to content

Commit a818211

Browse files
authored
Merge pull request #25 from python-ellar/pydanticv2_upgrade
Bump up Ellar version
2 parents 6d2d171 + 50b007c commit a818211

File tree

7 files changed

+27
-48
lines changed

7 files changed

+27
-48
lines changed

.github/workflows/test_full.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ jobs:
3737
run: pip install flit
3838
- name: Install Dependencies
3939
run: flit install --symlink
40-
- name: Black
41-
run: black --check ellar_throttler tests
4240
- name: Ruff Lint Check
4341
run: ruff check ellar_throttler tests
4442
- name: mypy

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ clean: ## Removing cached python compiled files
99
find . -name \*pyo | xargs rm -fv
1010
find . -name \*~ | xargs rm -fv
1111
find . -name __pycache__ | xargs rm -rfv
12+
find . -name .ruff_cache | xargs rm -rfv
1213

1314
install: ## Install dependencies
1415
flit install --deps develop --symlink
@@ -17,13 +18,12 @@ install-full: ## Install dependencies
1718
make install
1819
pre-commit install -f
1920

20-
lint: ## Run code linters
21-
black --check ellar_throttler tests
21+
lint:fmt ## Run code linters
2222
ruff check ellar_throttler tests
2323
mypy ellar_throttler
2424

25-
fmt format: ## Run code formatters
26-
black ellar_throttler tests
25+
fmt format:clean ## Run code formatters
26+
ruff format ellar_throttler tests
2727
ruff check --fix ellar_throttler tests
2828

2929
test: ## Run tests

ellar_throttler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""A rate limiting module for Ellar"""
22

3-
__version__ = "0.0.7"
3+
__version__ = "0.0.9"
44

55
from .decorators import skip_throttle, throttle
66
from .exception import ThrottledException

ellar_throttler/throttler_guard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import typing as t
33

44
from ellar.common import GuardCanActivate, IExecutionContext, Response
5-
from ellar.common.helper import get_name
5+
from ellar.common.utils import get_name
66
from ellar.core.connection import HTTPConnection
77
from ellar.core.services import Reflector
88
from ellar.di import injectable

mypy.ini

Lines changed: 0 additions & 37 deletions
This file was deleted.

pyproject.toml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ classifiers = [
4040
]
4141

4242
dependencies = [
43-
"ellar >= 0.4.4"
43+
"ellar >= 0.5.8"
4444
]
4545

4646

@@ -54,7 +54,6 @@ test = [
5454
"pytest >= 7.1.3,<8.0.0",
5555
"pytest-cov >= 2.12.0,<5.0.0",
5656
"mypy == 1.7.1",
57-
"black ==23.11.0",
5857
"ruff ==0.1.7",
5958
"pytest-asyncio",
6059
"autoflake",
@@ -83,3 +82,22 @@ ignore = [
8382

8483
[tool.ruff.isort]
8584
known-third-party = ["ellar",]
85+
86+
[tool.mypy]
87+
88+
show_column_numbers = true
89+
90+
follow_imports = 'normal'
91+
ignore_missing_imports = true
92+
93+
# be strict
94+
disallow_untyped_calls = true
95+
warn_return_any = true
96+
strict_optional = true
97+
warn_no_return = true
98+
warn_redundant_casts = true
99+
warn_unused_ignores = true
100+
101+
disallow_untyped_defs = true
102+
check_untyped_defs = true
103+
implicit_reexport = false

tests/app/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ellar.core import AppFactory
1+
from ellar.app import AppFactory
22

33
from ellar_throttler import ThrottlerGuard
44

0 commit comments

Comments
 (0)