Skip to content

Commit

Permalink
Drop pint higher-bound (#2741)
Browse files Browse the repository at this point in the history
Closes #2740

Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT authored Jun 25, 2024
1 parent 22ccf89 commit 40f6b16
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
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://github.com/hgrecco/pint/issues/1166
Size: TypeAlias = Quantity

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

0 comments on commit 40f6b16

Please sign in to comment.