Skip to content

Commit

Permalink
[Auto-generated] Update dependencies (#186)
Browse files Browse the repository at this point in the history
Update dependencies:
Update pytest requirement from ~=7.4 to ~=8.0 (#185)

Update `pre-commit` hooks.


Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
CasperWA and dependabot[bot] committed Jan 31, 2024
1 parent e5b4553 commit 4f874bf
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
exclude: ^.*\.ttl$

- repo: https://github.com/ambv/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand All @@ -31,7 +31,7 @@ repos:
- id: docs-landing-page

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.1.15
hooks:
- id: ruff
args:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ docs = [
]
dev = [
"pre-commit~=3.6",
"pytest~=7.4",
"pytest~=8.0",
"pytest-cov~=4.1",
"turtle-canon[docs]",
]
Expand Down
21 changes: 13 additions & 8 deletions tests/cli/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""PyTest fixtures for the CLI (`turtle_canon.cli`)."""

from __future__ import annotations

from pathlib import Path
Expand All @@ -20,8 +21,7 @@ def __call__(
expected_error: str | None = None,
run_dir: Path | str | None = None,
use_subprocess: bool = True,
) -> CalledProcessError | CLIOutput | CompletedProcess:
...
) -> CalledProcessError | CLIOutput | CompletedProcess: ...


class CLIOutput(NamedTuple):
Expand Down Expand Up @@ -90,9 +90,11 @@ def _clirunner(
args=["turtle-canon", *options],
capture_output=True,
check=True,
cwd=run_dir.name
if isinstance(run_dir, TemporaryDirectory)
else run_dir,
cwd=(
run_dir.name
if isinstance(run_dir, TemporaryDirectory)
else run_dir
),
text=True,
)
if expected_error:
Expand Down Expand Up @@ -135,9 +137,12 @@ def _clirunner(
if isinstance(run_dir, TemporaryDirectory)
else run_dir
)
with stdout_path.open("w") as stdout, stderr_path.open(
"w"
) as stderr, redirect_stdout(stdout), redirect_stderr(stderr):
with (
stdout_path.open("w") as stdout,
stderr_path.open("w") as stderr,
redirect_stdout(stdout),
redirect_stderr(stderr),
):
cli(options if options else None)
except SystemExit as exit_:
output = CLIOutput(
Expand Down
1 change: 1 addition & 0 deletions tests/cli/test_cmd_turtle_canon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test `turtle_canon.cli.cmd_turtle_canon` aka. the `turtle-canon` CLI."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pytest fixtures and setup functions."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/test_canon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test `turtle_canon.canon` module functions."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions tests/test_turtle_canon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""General tests for Turtle Canon."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions turtle_canon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
A tool for canonizing Turtle (`.ttl`) ontology files.
"""

from __future__ import annotations

__version__ = "0.1.0"
Expand Down
1 change: 1 addition & 0 deletions turtle_canon/canon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The main `turtle-canon` module."""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions turtle_canon/cli/cmd_turtle_canon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command line interface (CLI) for running `turtle-canon`."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions turtle_canon/cli/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility functions for `turtle-canon` CLI."""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions turtle_canon/utils/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Exceptions for general usage by the Turtle Canon tool."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions turtle_canon/utils/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Instead, they are `Exception`s that will be caught and treated specially by the CLI.
"""

from __future__ import annotations


Expand Down

0 comments on commit 4f874bf

Please sign in to comment.