Skip to content
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
12 changes: 6 additions & 6 deletions recipe/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
"f90nml >=1.4,<1.5",
"iotaa >=1.3,<2",
"jinja2 >=3.1,<3.2",
"jq ==1.7.*",
"jq ==1.8.*",
"jsonschema >=4.18,<4.24",
"lxml >=5.2,<5.5",
"make ==4.4.*",
"mypy ==1.15.*",
"mypy ==1.17.*",
"pip",
"pytest ==8.3.*",
"pytest-cov ==6.1.*",
"pytest-xdist ==3.6.*",
"pytest ==8.4.*",
"pytest-cov ==6.2.*",
"pytest-xdist ==3.8.*",
"python <3.14,==3.9,>=3.9",
"python-dateutil >=2.9,<2.10",
"pyyaml >=6.0,<6.1",
"requests >=2.32,<2.33",
"ruff ==0.11.*",
"ruff ==0.12.*",
"setuptools"
],
"run": [
Expand Down
12 changes: 6 additions & 6 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ requirements:
test:
requires:
- docformatter 1.7.*
- jq 1.7.*
- jq 1.8.*
- make 4.4.*
- mypy 1.15.*
- pytest 8.3.*
- pytest-cov 6.1.*
- pytest-xdist 3.6.*
- mypy 1.17.*
- pytest 8.4.*
- pytest-cov 6.2.*
- pytest-xdist 3.8.*
- python {{ pymin }}
- ruff 0.11.*
- ruff 0.12.*
about:
license: LGPL
3 changes: 3 additions & 0 deletions src/uwtools/config/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def __eq__(self, other: object) -> bool:
return NotImplemented
return self.tag == other.tag and self.value == other.value

def __hash__(self):
return hash(str(self))

def __repr__(self) -> str:
return ("%s %s" % (self.tag, self.value)).strip()

Expand Down
6 changes: 6 additions & 0 deletions src/uwtools/tests/config/test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def test_config_support_UWYAMLTag__eq():
assert tag0 == tag1


def test_config_support_UWYAMLTag__hash():
node = yaml.nodes.Node(tag="!foo", value="bar", start_mark=None, end_mark=None)
tag = support.UWYAMLTag(yaml.SafeLoader("data"), node=node)
assert hash(tag) == hash("!foo bar")


class TestUWYAMLConvert:
"""
Tests for class uwtools.config.support.UWYAMLConvert.
Expand Down
2 changes: 1 addition & 1 deletion src/uwtools/utils/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def filecopy(src: Path | str, dst: Path | str, check: bool = True) -> Node:
return filecopy_http(str(src), dst, check)
if src_scheme in SCHEMES.local:
return filecopy_local(_local_path(src), dst, check)
_bad_scheme(src, src_scheme) # noqa: RET503
return _bad_scheme(src, src_scheme)


@task
Expand Down