Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop pint higher-bound #2741

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
- "docutils>=0.16" # 0.16 is the current one available for RHEL9
- "fmf>=1.3.0"
- "jinja2>=2.11.3" # 3.1.2 / 3.1.2
- "pint>=0.16.1,<0.20" # 0.16.1 / 0.19.x TODO: Pint 0.20 requires larger changes to tmt.hardware
- "pint>=0.16.1" # 0.16.1
- "pygments>=2.7.4" # 2.7.4 is the current one available for RHEL9
- "requests>=2.25.1" # 2.28.2 / 2.31.0
- "ruamel.yaml>=0.16.6" # 0.17.32 / 0.17.32
Expand Down Expand Up @@ -81,7 +81,7 @@ repos:
- "docutils>=0.16" # 0.16 is the current one available for RHEL9
- "fmf>=1.3.0"
- "jinja2>=2.11.3" # 3.1.2 / 3.1.2
- "pint>=0.16.1,<0.20" # 0.16.1 / 0.19.x TODO: Pint 0.20 requires larger changes to tmt.hardware
- "pint>=0.16.1" # 0.16.1 / 0.19.x TODO: Pint 0.20 requires larger changes to tmt.hardware
- "pygments>=2.7.4" # 2.7.4 is the current one available for RHEL9
- "requests>=2.25.1" # 2.28.2 / 2.31.0
- "ruamel.yaml>=0.16.6" # 0.17.32 / 0.17.32
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [ # F39 / PyPI
"docutils>=0.16", # 0.16 is the current one available for RHEL9
"fmf>=1.3.0",
"jinja2>=2.11.3", # 3.1.2 / 3.1.2
"pint>=0.16.1,<0.20", # 0.16.1 / 0.19.x TODO: Pint 0.20 requires larger changes to tmt.hardware
"pint>=0.16.1", # 0.16.1
"pygments>=2.7.4", # 2.7.4 is the current one available for RHEL9
"requests>=2.25.1", # 2.28.2 / 2.31.0
"ruamel.yaml>=0.16.6", # 0.17.32 / 0.17.32
Expand Down Expand Up @@ -249,7 +249,8 @@ ignore = [
"tmt/convert.py",
"tmt/lint.py",
"tmt/queue.py",
"tmt/utils.py"
"tmt/utils.py",
"tmt/hardware.py", # pyright does not pick up pint's _typing.py or something :/
]

pythonVersion = "3.9"
Expand Down
4 changes: 3 additions & 1 deletion tmt/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
from typing_extensions import TypeAlias

#: A type of values describing sizes of things like storage or RAM.
Size: TypeAlias = 'Quantity[int]'
# Note: type-hinting is a bit wonky with pyright
# https:/hgrecco/pint/issues/1166
Size: TypeAlias = Quantity

#: Unit registry, used and shared by all code.
UNITS = pint.UnitRegistry()
Expand Down
Loading