Skip to content

Commit fd29a48

Browse files
committed
Improve typing a bit
1 parent b90a5e4 commit fd29a48

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

openandroidinstaller/installer_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from pathlib import Path
1717
from typing import List, Optional
18+
from typing_extensions import Self
1819

1920
import schema
2021
import yaml
@@ -67,7 +68,7 @@ def __init__(
6768
self.twrp_link = metadata.get("twrp-link")
6869

6970
@classmethod
70-
def from_file(cls, path):
71+
def from_file(cls, path) -> Self:
7172
with open(path, "r", encoding="utf-8") as stream:
7273
try:
7374
raw_config = yaml.safe_load(stream)

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pytest-mock = "^3.10.0"
2929
bandit = "^1.7.4"
3030
pytest-subprocess = "^1.5.0"
3131
mypy = "^1.0.0"
32+
typing-extensions = "^4.7.1"
3233

3334
[tool.poetry.dev-dependencies]
3435

0 commit comments

Comments
 (0)