forked from Mirror/pmbootstrap
pmb: Add lots of type hints (MR 2464)
This commit is contained in:
parent
d05d57b37e
commit
225d8b30a0
71 changed files with 566 additions and 325 deletions
|
@ -1,5 +1,7 @@
|
|||
# Copyright 2024 Oliver Smith
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
from pathlib import Path
|
||||
|
||||
from pmb.meta import Cache
|
||||
from pmb.helpers.exceptions import NonBugError
|
||||
|
||||
|
@ -12,7 +14,7 @@ except ImportError:
|
|||
|
||||
|
||||
@Cache("path")
|
||||
def load_toml_file(path) -> dict:
|
||||
def load_toml_file(path: Path) -> dict:
|
||||
"""Read a toml file into a dict and show the path on error."""
|
||||
with open(path, mode="rb") as f:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue