Skip to content

Commit fdef82c

Browse files
Fix older Python compatibility using typing-extensions
1 parent c4c8963 commit fdef82c

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Learn more by reading [the documentation](https://comp1010unsw.github.io/pyhtml-
1515

1616
* A modern and readable codebase.
1717

18-
* No dependencies.
19-
2018
* 100% test coverage.
2119

2220
## Usage

poetry.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyhtml/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
1717
* A modern and readable codebase.
1818
19-
* No dependencies.
20-
2119
* 100% test coverage.
2220
2321
## Usage

pyhtml/__tag_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"""
66

77
from typing import TypeVar
8-
from warnings import deprecated
8+
9+
# from warnings import deprecated
10+
from typing_extensions import deprecated
911

1012
from . import __util as util
1113
from .__render_options import FullRenderOptions, RenderOptions

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
]
2121

2222
requires-python = ">=3.10"
23+
dependencies = ["typing-extensions >=4.12.2"]
2324

2425
[project.urls]
2526
homepage = "https://comp1010unsw.github.io/pyhtml-enhanced/"
@@ -84,7 +85,7 @@ select = [
8485
]
8586
"pyhtml/__tags/generated.py" = [
8687
# Line too long
87-
"E501"
88+
"E501",
8889
]
8990

9091
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)