forked from Mirror/pmbootstrap
Run ruff check --fix (MR 2357)
Now that we have target-version = "py310" in [tool.ruff] in pyproject.toml, ruff check complains about using typing.Optional and typing.Union instead of newer syntax. Run the tool to fix it.
This commit is contained in:
parent
9fd45fb334
commit
36dd53f402
25 changed files with 116 additions and 130 deletions
|
@ -1,7 +1,6 @@
|
|||
import os
|
||||
import glob
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from collections.abc import Generator
|
||||
|
||||
import pmb.config
|
||||
|
@ -61,7 +60,7 @@ def pkgrepo_name_from_subdir(subdir: Path) -> str:
|
|||
raise RuntimeError(f"aports subdir '{subdir}' not found")
|
||||
|
||||
|
||||
def pkgrepo_glob_one(path: str) -> Optional[Path]:
|
||||
def pkgrepo_glob_one(path: str) -> Path | None:
|
||||
"""
|
||||
Search for the file denoted by path in all aports repositories.
|
||||
path can be a glob.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue