Skip to content

Commit

Permalink
Fix getting teardown dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Klavionik committed Dec 23, 2023
1 parent 4fb2bdf commit b64ebbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions battleship/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


async def cleanup_clients(app: Application) -> None:
client_repository = app.service_provider.get(ClientRepository)
client_repository = app.services.provider.get(ClientRepository)

try:
count = await client_repository.clear()
Expand All @@ -47,7 +47,7 @@ async def cleanup_clients(app: Application) -> None:


async def teardown_redis(app: Application) -> None:
client = app.service_provider.get(redis.Redis)
client = app.services.provider.get(redis.Redis)

try:
await client.aclose()
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ plugins = [
"pydantic.mypy"
]

[[tool.mypy.overrides]]
module = "battleship.server.app"
disable_error_code = ["attr-defined"]

[tool.poetry.group.dev.dependencies]
mypy = "^1.5.0"
coverage = "^7.3.0"
Expand Down

0 comments on commit b64ebbf

Please sign in to comment.