Skip to content

Commit 0849991

Browse files
committed
Update code-quality tools and tweak code in response
1 parent 57c4712 commit 0849991

File tree

5 files changed

+22
-13
lines changed

5 files changed

+22
-13
lines changed

recipe/meta.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
"f90nml >=1.4,<1.5",
99
"iotaa >=1.3,<2",
1010
"jinja2 >=3.1,<3.2",
11-
"jq ==1.7.*",
11+
"jq ==1.8.*",
1212
"jsonschema >=4.18,<4.24",
1313
"lxml >=5.2,<5.5",
1414
"make ==4.4.*",
15-
"mypy ==1.15.*",
15+
"mypy ==1.17.*",
1616
"pip",
17-
"pytest ==8.3.*",
18-
"pytest-cov ==6.1.*",
19-
"pytest-xdist ==3.6.*",
17+
"pytest ==8.4.*",
18+
"pytest-cov ==6.2.*",
19+
"pytest-xdist ==3.8.*",
2020
"python <3.14,==3.9,>=3.9",
2121
"python-dateutil >=2.9,<2.10",
2222
"pyyaml >=6.0,<6.1",
2323
"requests >=2.32,<2.33",
24-
"ruff ==0.11.*",
24+
"ruff ==0.12.*",
2525
"setuptools"
2626
],
2727
"run": [

recipe/meta.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ requirements:
2828
test:
2929
requires:
3030
- docformatter 1.7.*
31-
- jq 1.7.*
31+
- jq 1.8.*
3232
- make 4.4.*
33-
- mypy 1.15.*
34-
- pytest 8.3.*
35-
- pytest-cov 6.1.*
36-
- pytest-xdist 3.6.*
33+
- mypy 1.17.*
34+
- pytest 8.4.*
35+
- pytest-cov 6.2.*
36+
- pytest-xdist 3.8.*
3737
- python {{ pymin }}
38-
- ruff 0.11.*
38+
- ruff 0.12.*
3939
about:
4040
license: LGPL

src/uwtools/config/support.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ def __eq__(self, other: object) -> bool:
107107
return NotImplemented
108108
return self.tag == other.tag and self.value == other.value
109109

110+
def __hash__(self):
111+
return hash(str(self))
112+
110113
def __repr__(self) -> str:
111114
return ("%s %s" % (self.tag, self.value)).strip()
112115

src/uwtools/tests/config/test_support.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ def test_config_support_UWYAMLTag__eq():
6060
assert tag0 == tag1
6161

6262

63+
def test_config_support_UWYAMLTag__hash():
64+
node = yaml.nodes.Node(tag="!foo", value="bar", start_mark=None, end_mark=None)
65+
tag = support.UWYAMLTag(yaml.SafeLoader("data"), node=node)
66+
assert hash(tag) == hash("!foo bar")
67+
68+
6369
class TestUWYAMLConvert:
6470
"""
6571
Tests for class uwtools.config.support.UWYAMLConvert.

src/uwtools/utils/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def filecopy(src: Path | str, dst: Path | str, check: bool = True) -> Node:
121121
return filecopy_http(str(src), dst, check)
122122
if src_scheme in SCHEMES.local:
123123
return filecopy_local(_local_path(src), dst, check)
124-
_bad_scheme(src, src_scheme) # noqa: RET503
124+
return _bad_scheme(src, src_scheme)
125125

126126

127127
@task

0 commit comments

Comments
 (0)