Skip to content

Commit

Permalink
Merge pull request #184 from Jakub3628800/deprecation-warnings
Browse files Browse the repository at this point in the history
deprecation warnings
  • Loading branch information
Jakub3628800 authored Jan 13, 2024
2 parents 8461d03 + c7e13ce commit 59fa497
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- --line-length=120

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args:
Expand Down
7 changes: 2 additions & 5 deletions shortener/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
class PostgresSettings(BaseSettings):
"""Settings for postgres connection."""

model_config = {"env_prefix": "DB_", "env_file": ".env", "env_file_encoding": "utf-8"}

host: str = "localhost"
port: int = 5432
database: str = "postgres"
user: str = "localuser"
password: str = "password123"
ssl: bool = False

class Config:
env_prefix = "DB_"
env_file = ".env"
env_file_encoding = "utf-8"
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def test_client():
async_pool = asyncpg.create_pool(min_size=5, max_size=25, **dict(PostgresSettings(_env_file=None)))
async with async_pool as pool:
app.pool = pool
with TestClient(app=app, backend_options={"use_uvloop": True}) as client:
with TestClient(app=app) as client:
yield client

return
Expand Down

0 comments on commit 59fa497

Please sign in to comment.