Skip to content

[pre-commit.ci] pre-commit autoupdate #166

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

Merged
merged 2 commits into from
Aug 22, 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 @@ -4,7 +4,7 @@ repos:
hooks:
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from sphinx.application import Sphinx


@pytest.fixture()
@pytest.fixture
def make_app_setup(
make_app: Callable[..., Sphinx], tmp_path: Path
) -> Callable[..., Sphinx]:
Expand All @@ -32,7 +32,7 @@ def make_app_setup(**conf: Any) -> Sphinx: # noqa: ANN401
return make_app_setup


@pytest.fixture()
@pytest.fixture
def make_module(
tmp_path: Path,
) -> Generator[Callable[[str, str], ModuleType], None, None]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_definition_list_typed_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from sphinx.application import Sphinx


@pytest.fixture()
@pytest.fixture
def app(make_app_setup: Callable[..., Sphinx]) -> Sphinx:
app = make_app_setup()
app.setup_extension("scanpydoc.definition_list_typed_field")
Expand Down
8 changes: 4 additions & 4 deletions tests/test_elegant_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __call__( # noqa: D102
NONE_RTYPE = ":rtype: :sphinx_autodoc_typehints_type:`\\:py\\:obj\\:\\`None\\``"


@pytest.fixture()
@pytest.fixture
def testmod(make_module: Callable[[str, str], ModuleType]) -> ModuleType:
return make_module(
"testmod",
Expand All @@ -59,7 +59,7 @@ class Gen(Generic[T]): pass
)


@pytest.fixture()
@pytest.fixture
def app(make_app_setup: Callable[..., Sphinx]) -> Sphinx:
return make_app_setup(
master_doc="index",
Expand All @@ -79,7 +79,7 @@ def app(make_app_setup: Callable[..., Sphinx]) -> Sphinx:
)


@pytest.fixture()
@pytest.fixture
def process_doc(app: Sphinx) -> ProcessDoc:
listeners = sorted(
(l for l in app.events.listeners["autodoc-process-docstring"]),
Expand Down Expand Up @@ -276,7 +276,7 @@ def test_typing_classes(app: Sphinx, annotation: type) -> None:

@pytest.mark.skipif(sys.version_info < (3, 10), reason="requires Python 3.10+")
def test_union_type(app: Sphinx) -> None:
union = eval("int | str") # noqa: S307, PGH001
union = eval("int | str") # noqa: S307
assert typehints_formatter(union, app.config) is None


Expand Down
4 changes: 2 additions & 2 deletions tests/test_rtd_github_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
HERE = Path(__file__).parent


@pytest.fixture()
@pytest.fixture
def config() -> Config:
config = Config()
config.add(
Expand All @@ -46,7 +46,7 @@ def config() -> Config:
return config


@pytest.fixture()
@pytest.fixture
def _env(monkeypatch: MonkeyPatch) -> None:
monkeypatch.setattr("scanpydoc.rtd_github_links.github_base_url", "x")

Expand Down
Loading