Skip to content

Commit

Permalink
chore(ruff) Automated fixes for Python 3.9
Browse files Browse the repository at this point in the history
ruff check . --select ALL --fix --unsafe-fixes --preview --show-fixes --ignore T201 --ignore PT014 --ignore RUF100; ruff format .;

Fixed 9 errors:
- docs/conf.py:
    6 × UP006 (non-pep585-annotation)
- tests/test_cli.py:
    3 × UP006 (non-pep585-annotation)

Found 54 errors (9 fixed, 45 remaining).
5 files left unchanged
  • Loading branch information
tony committed Dec 18, 2024
1 parent bcbf310 commit d09d06a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
sys.path.insert(0, str(cwd / "_ext"))

# package data
about: t.Dict[str, str] = {}
about: dict[str, str] = {}
with (src_root / "g" / "__about__.py").open() as fp:
exec(fp.read(), about)

Expand Down Expand Up @@ -70,8 +70,8 @@
html_css_files = ["css/custom.css"]
html_extra_path = ["manifest.json"]
html_theme = "furo"
html_theme_path: t.List[str] = []
html_theme_options: t.Dict[str, t.Union[str, t.List[t.Dict[str, str]]]] = {
html_theme_path: list[str] = []
html_theme_options: dict[str, t.Union[str, list[dict[str, str]]]] = {
"light_logo": "img/g.svg",
"dark_logo": "img/g-dark.svg",
"footer_icons": [
Expand Down Expand Up @@ -129,7 +129,7 @@
}


def linkcode_resolve(domain: str, info: t.Dict[str, str]) -> t.Union[None, str]:
def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
"""
Determine the URL corresponding to Python object.
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ class CommandLineTestFixture(t.NamedTuple):
env: EnvFlag

# test data
argv_args: t.List[str]
argv_args: list[str]

# results
expect_cmd: t.Optional[str]


TEST_FIXTURES: t.List[CommandLineTestFixture] = [
TEST_FIXTURES: list[CommandLineTestFixture] = [
CommandLineTestFixture(
test_id="g-cmd-inside-git-dir",
env=EnvFlag.Git,
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_command_line(
# capsys: pytest.CaptureFixture[str],
test_id: str,
env: EnvFlag,
argv_args: t.List[str],
argv_args: list[str],
expect_cmd: t.Optional[str],
monkeypatch: pytest.MonkeyPatch,
tmp_path: pathlib.Path,
Expand Down

0 comments on commit d09d06a

Please sign in to comment.