Skip to content

Commit

Permalink
Merge pull request #1209 from uriyyo/dependabot/pip/ruff-0.5.0
Browse files Browse the repository at this point in the history
[no ci]
  • Loading branch information
github-actions[bot] authored Jul 2, 2024
2 parents dc8f063 + d8f5a1e commit 5666634
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Install dependencies
run: |
poetry install -E all
poetry install -E all --sync
- name: Lint
run: |
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Install dependencies
run: |
poetry install -E all
poetry install -E all --sync
- name: Install pydantic v2
if: ${{ matrix.pydantic_v2 == 'true' }}
Expand Down Expand Up @@ -89,12 +89,6 @@ jobs:
poetry run pip install -U odmantic "pydantic<2.7"
poetry run pytest tests -m "odmantic" --cov-append --cov-report=xml --cassandra-dsn=${CQL_TEST_HOST}
- name: Unit tests gino
if: ${{ matrix.pydantic_v2 == 'false' && matrix.python-version != '3.12' }}
run: |
poetry run pip install -U "gino[starlette]" "fastapi==0.84.0"
poetry run pytest -m gino --cov-append --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
39 changes: 20 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ requests = "^2.32.2"
uvicorn = "^0.30.1"
Jinja2 = "^3.1.4"
mypy = "^1.10.1"
ruff = "^0.4.10"
ruff = "^0.5.0"

[tool.poetry.extras]
sqlmodel = ["sqlmodel", "sqlakeyset"]
Expand Down
8 changes: 4 additions & 4 deletions tests/test_customization.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ def test_additional_fields():
if IS_PYDANTIC_V2:
from pydantic_core import PydanticUndefined

assert CustomPage.model_fields["a"].annotation == int
assert CustomPage.model_fields["a"].annotation is int
assert CustomPage.model_fields["a"].default is PydanticUndefined

assert CustomPage.model_fields["b"].annotation == str
assert CustomPage.model_fields["b"].annotation is str
assert CustomPage.model_fields["b"].default == "my-default"
else:
assert CustomPage.__fields__["a"].type_ == int
assert CustomPage.__fields__["a"].type_ is int
assert CustomPage.__fields__["a"].default is None

assert CustomPage.__fields__["b"].type_ == str
assert CustomPage.__fields__["b"].type_ is str
assert CustomPage.__fields__["b"].default == "my-default"

0 comments on commit 5666634

Please sign in to comment.