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:
Oliver Smith 2024-07-16 00:21:13 +02:00
parent 9fd45fb334
commit 36dd53f402
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
25 changed files with 116 additions and 130 deletions

View file

@ -2,11 +2,10 @@
# SPDX-License-Identifier: GPL-3.0-or-later
import os
from pathlib import Path
from typing import Optional
from pmb.core.pkgrepo import pkgrepo_glob_one, pkgrepo_iglob
def find_path(codename: str, file="") -> Optional[Path]:
def find_path(codename: str, file="") -> Path | None:
"""Find path to device APKBUILD under `device/*/device-`.
:param codename: device codename