Skip to content

Commit

Permalink
More explicit field aliasing for silly type checker behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed May 23, 2023
1 parent 85cd520 commit de0d258
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion referencing/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,11 @@ class Registry(Mapping[URI, Resource[D]]):
_resources: HashTrieMap[URI, Resource[D]] = field(
default=HashTrieMap(),
converter=HashTrieMap.convert, # type: ignore[reportGeneralTypeIssues] # noqa: E501
alias="resources",
)
_anchors: HashTrieMap[tuple[URI, str], AnchorType[D]] = HashTrieMap() # type: ignore[reportGeneralTypeIssues] # noqa: E501
_uncrawled: HashTrieSet[URI] = EMPTY_UNCRAWLED
_retrieve: Retrieve[D] = field(default=_fail_to_retrieve)
_retrieve: Retrieve[D] = field(default=_fail_to_retrieve, alias="retrieve")

def __getitem__(self, uri: URI) -> Resource[D]:
"""
Expand Down

0 comments on commit de0d258

Please sign in to comment.