Skip to content

Commit

Permalink
use typing for py before 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Dec 9, 2023
1 parent ae06317 commit 5ef2fa1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mxdev/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .logging import logger
from .including import read_with_included
from .logging import logger

import os
import pkg_resources
Expand Down
6 changes: 4 additions & 2 deletions src/mxdev/including.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
from urllib import parse
from urllib import request

import os
import pathlib
import tempfile
import os
import typing


def resolve_dependencies(
file_or_url: str | pathlib.Path,
file_or_url: typing.Union[str, pathlib.Path],
tmpdir: tempfile.TemporaryDirectory,
http_parent=None,
) -> list[pathlib.Path]:
Expand Down
2 changes: 1 addition & 1 deletion src/mxdev/tests/test_including.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def test_resolve_dependencies_filenotfound(tmp_path):
with pytest.raises(FileNotFoundError):
resolve_dependencies(base / "file__not_found.ini", tmp_path)


def test_read_with_included():
from mxdev.including import read_with_included

Expand All @@ -53,4 +54,3 @@ def test_read_with_included():
assert cfg["settings"]["unique_2"] == "2"
assert cfg["settings"]["unique_3"] == "3"
assert cfg["settings"]["unique_4"] == "4"

0 comments on commit 5ef2fa1

Please sign in to comment.