Skip to content

Commit f30cece

Browse files
authored
Merge pull request #2 from modern-python/ty
migrate to ty
2 parents 8bcc875 + 8da528a commit f30cece

5 files changed

Lines changed: 5 additions & 11 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ __pycache__/*
99
.idea
1010
.DS_Store
1111
.env
12-
.mypy_cache
1312
.pytest_cache
1413
.ruff_cache
1514
.coverage

Justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ lint:
88
uv run eof-fixer .
99
uv run ruff format
1010
uv run ruff check --fix
11-
uv run mypy .
11+
uv run ty check
1212

1313
lint-ci:
1414
uv run eof-fixer . --check
1515
uv run ruff format --check
1616
uv run ruff check --no-fix
17-
uv run mypy .
17+
uv run ty check
1818

1919
test *args:
2020
uv run --no-sync pytest {{ args }}

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"Modern-DI-Faststream"
22
==
33
[![Test Coverage](https://codecov.io/gh/modern-python/modern-di-faststream/branch/main/graph/badge.svg)](https://codecov.io/gh/modern-python/modern-di-faststream)
4-
[![MyPy Strict](https://img.shields.io/badge/mypy-strict-blue)](https://mypy.readthedocs.io/en/stable/getting_started.html#strict-mode-and-configuration)
54
[![Supported versions](https://img.shields.io/pypi/pyversions/modern-di-faststream.svg)](https://pypi.python.org/pypi/modern-di-faststream)
65
[![downloads](https://img.shields.io/pypi/dm/modern-di-faststream.svg)](https://pypistats.org/packages/modern-di-faststream)
76
[![GitHub stars](https://img.shields.io/github/stars/modern-python/modern-di-faststream)](https://github.com/modern-python/modern-di-faststream/stargazers)

modern_di_faststream/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __call__(self, *args: P.args, **kwargs: P.kwargs) -> "_DiMiddleware[P]":
3434
class _DiMiddleware(faststream.BaseMiddleware, typing.Generic[P]):
3535
def __init__(self, di_container: Container, *args: P.args, **kwargs: P.kwargs) -> None:
3636
self.di_container = di_container
37-
super().__init__(*args, **kwargs) # type: ignore[arg-type]
37+
super().__init__(*args, **kwargs)
3838

3939
async def consume_scope(
4040
self,
@@ -81,7 +81,7 @@ def setup_di(
8181
container.providers_registry.add_providers(faststream_message_provider)
8282
app.context.set_global("di_container", container)
8383
app.after_shutdown(container.close_async)
84-
app.broker.add_middleware(_DIMiddlewareFactory(container))
84+
app.broker.add_middleware(_DIMiddlewareFactory(container)) # type: ignore[invalid-argument-type]
8585
return container
8686

8787

pyproject.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dev = [
3232
"asgi-lifespan",
3333
]
3434
lint = [
35-
"mypy",
35+
"ty",
3636
"ruff",
3737
"eof-fixer",
3838
"typing-extensions",
@@ -45,10 +45,6 @@ build-backend = "hatchling.build"
4545
[tool.hatch.build]
4646
include = ["modern_di_faststream"]
4747

48-
[tool.mypy]
49-
python_version = "3.10"
50-
strict = true
51-
5248
[tool.ruff]
5349
fix = false
5450
unsafe-fixes = true

0 commit comments

Comments
 (0)