Skip to content

Commit

Permalink
Update fastapi, ruff, pytest e taskipy
Browse files Browse the repository at this point in the history
  • Loading branch information
dunossauro committed Dec 5, 2024
1 parent ec16195 commit 124271a
Show file tree
Hide file tree
Showing 50 changed files with 5,004 additions and 4,460 deletions.
682 changes: 363 additions & 319 deletions codigo_das_aulas/01/poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions codigo_das_aulas/01/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
fastapi = {extras = ["standard"], version = "^0.115.5"}
fastapi = {extras = ["standard"], version = "^0.115.6"}

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
taskipy = "^1.14.0"
ruff = "^0.7.4"
httpx = "^0.27.2"
taskipy = "^1.14.1"
ruff = "^0.8.1"
httpx = "^0.28.0"

[tool.ruff]
line-length = 79
Expand Down
682 changes: 363 additions & 319 deletions codigo_das_aulas/02/poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions codigo_das_aulas/02/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
fastapi = {extras = ["standard"], version = "^0.115.5"}
fastapi = {extras = ["standard"], version = "^0.115.6"}

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
taskipy = "^1.14.0"
ruff = "^0.7.4"
httpx = "^0.27.2"
taskipy = "^1.14.1"
ruff = "^0.8.1"
httpx = "^0.28.0"

[tool.ruff]
line-length = 79
Expand Down
682 changes: 363 additions & 319 deletions codigo_das_aulas/03/poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions codigo_das_aulas/03/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
fastapi = {extras = ["standard"], version = "^0.115.5"}
fastapi = {extras = ["standard"], version = "^0.115.6"}

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
taskipy = "^1.14.0"
ruff = "^0.7.4"
httpx = "^0.27.2"
taskipy = "^1.14.1"
ruff = "^0.8.1"
httpx = "^0.28.0"

[tool.ruff]
line-length = 79
Expand Down
688 changes: 366 additions & 322 deletions codigo_das_aulas/04/poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions codigo_das_aulas/04/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ packages = [{include = "fast_zero"}]

[tool.poetry.dependencies]
python = "^3.11"
fastapi = {extras = ["standard"], version = "^0.115.5"}
fastapi = {extras = ["standard"], version = "^0.115.6"}
sqlalchemy = "^2.0.36"
pydantic-settings = "^2.6.1"
alembic = "^1.14.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
taskipy = "^1.14.0"
ruff = "^0.7.4"
httpx = "^0.27.2"
taskipy = "^1.14.1"
ruff = "^0.8.1"
httpx = "^0.28.0"

[tool.ruff]
line-length = 79
Expand Down
1 change: 0 additions & 1 deletion codigo_das_aulas/04/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def session():

@contextmanager
def _mock_db_time(*, model, time=datetime(2024, 1, 1)):

def fake_time_handler(mapper, connection, target):
if hasattr(target, 'created_at'):
target.created_at = time
Expand Down
2 changes: 1 addition & 1 deletion codigo_das_aulas/05/fast_zero/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def update_user(
except IntegrityError:
raise HTTPException(
status_code=HTTPStatus.CONFLICT,
detail='Username or Email already exists'
detail='Username or Email already exists',
)


Expand Down
688 changes: 366 additions & 322 deletions codigo_das_aulas/05/poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions codigo_das_aulas/05/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ packages = [{include = "fast_zero"}]

[tool.poetry.dependencies]
python = "^3.11"
fastapi = {extras = ["standard"], version = "^0.115.5"}
fastapi = {extras = ["standard"], version = "^0.115.6"}
sqlalchemy = "^2.0.36"
pydantic-settings = "^2.6.1"
alembic = "^1.14.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
taskipy = "^1.14.0"
ruff = "^0.7.4"
httpx = "^0.27.2"
taskipy = "^1.14.1"
ruff = "^0.8.1"
httpx = "^0.28.0"

[tool.ruff]
line-length = 79
Expand Down
1 change: 0 additions & 1 deletion codigo_das_aulas/05/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def session():

@contextmanager
def _mock_db_time(*, model, time=datetime(2024, 1, 1)):

def fake_time_handler(mapper, connection, target):
if hasattr(target, 'created_at'):
target.created_at = time
Expand Down
2 changes: 1 addition & 1 deletion codigo_das_aulas/06/fast_zero/security.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from datetime import datetime, timedelta
from http import HTTPStatus
from zoneinfo import ZoneInfo

from fastapi import Depends, HTTPException
from fastapi.security import OAuth2PasswordBearer
from jwt import DecodeError, decode, encode
from pwdlib import PasswordHash
from sqlalchemy import select
from sqlalchemy.orm import Session
from zoneinfo import ZoneInfo

from fast_zero.database import get_session
from fast_zero.models import User
Expand Down
694 changes: 369 additions & 325 deletions codigo_das_aulas/06/poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions codigo_das_aulas/06/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ packages = [{include = "fast_zero"}]

[tool.poetry.dependencies]
python = "^3.11"
fastapi = {extras = ["standard"], version = "^0.115.5"}
fastapi = {extras = ["standard"], version = "^0.115.6"}
sqlalchemy = "^2.0.36"
pydantic-settings = "^2.6.1"
alembic = "^1.14.0"
pyjwt = "^2.10.0"
pyjwt = "^2.10.1"
pwdlib = {extras = ["argon2"], version = "^0.2.1"}

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
taskipy = "^1.14.0"
ruff = "^0.7.4"
httpx = "^0.27.2"
taskipy = "^1.14.1"
ruff = "^0.8.1"
httpx = "^0.28.0"

[tool.ruff]
line-length = 79
Expand Down
2 changes: 1 addition & 1 deletion codigo_das_aulas/07/fast_zero/routers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def update_user(
except IntegrityError:
raise HTTPException(
status_code=HTTPStatus.CONFLICT,
detail='Username or Email already exists'
detail='Username or Email already exists',
)


Expand Down
2 changes: 1 addition & 1 deletion codigo_das_aulas/07/fast_zero/security.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from datetime import datetime, timedelta
from http import HTTPStatus
from zoneinfo import ZoneInfo

from fastapi import Depends, HTTPException
from fastapi.security import OAuth2PasswordBearer
from jwt import DecodeError, decode, encode
from pwdlib import PasswordHash
from sqlalchemy import select
from sqlalchemy.orm import Session
from zoneinfo import ZoneInfo

from fast_zero.database import get_session
from fast_zero.models import User
Expand Down
Loading

0 comments on commit 124271a

Please sign in to comment.