Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆ Bump ruff from 0.5.5 to 0.8.1 #128

Merged
merged 5 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
rev: v0.8.2
hooks:
- id: ruff
args:
Expand Down
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pytest >=4.4.0,<9.0.0
coverage[toml] >=6.2,<8.0
mypy ==1.13.0
ruff ==0.5.5
ruff ==0.8.2
# Needed explicitly by fastapi-cli-slim
fastapi-slim
uvicorn
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from typing import Generator

import pytest
from fastapi_cli.logging import setup_logging
from typer import rich_utils

from fastapi_cli.logging import setup_logging


@pytest.fixture(autouse=True)
def reset_syspath() -> Generator[None, None, None]:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from unittest.mock import patch

import uvicorn
from fastapi_cli.cli import app
from fastapi_cli.utils.cli import get_uvicorn_log_config
from typer.testing import CliRunner

from fastapi_cli.cli import app
from fastapi_cli.utils.cli import get_uvicorn_log_config
from tests.utils import changing_dir

runner = CliRunner()
Expand Down
9 changes: 6 additions & 3 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from pathlib import Path

import pytest
from typer.testing import CliRunner

from fastapi_cli.discover import get_import_data
from fastapi_cli.exceptions import FastAPICLIException
from typer.testing import CliRunner

from .utils import changing_dir

Expand All @@ -13,9 +14,10 @@


def test_no_uvicorn() -> None:
import fastapi_cli.cli
import uvicorn

import fastapi_cli.cli

fastapi_cli.cli.uvicorn = None # type: ignore[attr-defined, assignment]

with changing_dir(assets_path):
Expand All @@ -31,9 +33,10 @@ def test_no_uvicorn() -> None:


def test_no_fastapi() -> None:
import fastapi_cli.discover
from fastapi import FastAPI

import fastapi_cli.discover

fastapi_cli.discover.FastAPI = None # type: ignore[attr-defined, assignment]
with changing_dir(assets_path):
with pytest.raises(FastAPICLIException) as exc_info:
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils_default_dir.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path

import pytest

from fastapi_cli.discover import get_import_data
from fastapi_cli.exceptions import FastAPICLIException

Expand Down
3 changes: 2 additions & 1 deletion tests/test_utils_default_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from pathlib import Path

import pytest
from pytest import CaptureFixture

from fastapi_cli.discover import get_import_data
from fastapi_cli.exceptions import FastAPICLIException
from pytest import CaptureFixture

from .utils import changing_dir

Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils_package.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from pathlib import Path

import pytest
from fastapi_cli.discover import get_import_data
from fastapi_cli.exceptions import FastAPICLIException
from pytest import CaptureFixture

from fastapi_cli.discover import get_import_data
from fastapi_cli.exceptions import FastAPICLIException
from tests.utils import changing_dir

assets_path = Path(__file__).parent / "assets"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_utils_single_file.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from pathlib import Path

import pytest
from pytest import CaptureFixture

from fastapi_cli.discover import get_import_data
from fastapi_cli.exceptions import FastAPICLIException
from pytest import CaptureFixture

from .utils import changing_dir

Expand Down
Loading