Skip to content

Commit 2ae6ee1

Browse files
committed
Remove the now-unneeded noqa's.
1 parent e470356 commit 2ae6ee1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

referencing/_core.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Resource(Generic[D]):
101101
def from_contents(
102102
cls,
103103
contents: D,
104-
default_specification: Specification[D] = None, # type: ignore[reportGeneralTypeIssues] # noqa: E501
104+
default_specification: Specification[D] = None, # type: ignore[reportGeneralTypeIssues]
105105
) -> Resource[D]:
106106
"""
107107
Attempt to discern which specification applies to the given contents.
@@ -116,18 +116,18 @@ def from_contents(
116116
"""
117117
specification = default_specification
118118
if isinstance(contents, Mapping):
119-
jsonschema_dialect_id = contents.get("$schema") # type: ignore[reportUnknownMemberType] # noqa: E501
119+
jsonschema_dialect_id = contents.get("$schema") # type: ignore[reportUnknownMemberType]
120120
if jsonschema_dialect_id is not None:
121121
from referencing.jsonschema import specification_with
122122

123123
specification = specification_with(
124-
jsonschema_dialect_id, # type: ignore[reportUnknownArgumentType] # noqa: E501
124+
jsonschema_dialect_id, # type: ignore[reportUnknownArgumentType]
125125
default=default_specification,
126126
)
127127

128128
if specification is None: # type: ignore[reportUnnecessaryComparison]
129129
raise exceptions.CannotDetermineSpecification(contents)
130-
return cls(contents=contents, specification=specification) # type: ignore[reportUnknownArgumentType] # noqa: E501
130+
return cls(contents=contents, specification=specification) # type: ignore[reportUnknownArgumentType]
131131

132132
@classmethod
133133
def opaque(cls, contents: D) -> Resource[D]:
@@ -183,7 +183,7 @@ def pointer(self, pointer: str, resolver: Resolver[D]) -> Resolved[D]:
183183
else:
184184
segment = segment.replace("~1", "/").replace("~0", "~")
185185
try:
186-
contents = contents[segment] # type: ignore[reportUnknownArgumentType] # noqa: E501
186+
contents = contents[segment] # type: ignore[reportUnknownArgumentType]
187187
except LookupError:
188188
raise exceptions.PointerToNowhere(ref=pointer, resource=self)
189189

@@ -192,11 +192,11 @@ def pointer(self, pointer: str, resolver: Resolver[D]) -> Resolved[D]:
192192
resolver = self._specification.maybe_in_subresource(
193193
segments=segments,
194194
resolver=resolver,
195-
subresource=self._specification.create_resource(contents), # type: ignore[reportUnknownArgumentType] # noqa: E501
195+
subresource=self._specification.create_resource(contents), # type: ignore[reportUnknownArgumentType]
196196
)
197197
if resolver is not last:
198198
segments = []
199-
return Resolved(contents=contents, resolver=resolver) # type: ignore[reportUnknownArgumentType] # noqa: E501
199+
return Resolved(contents=contents, resolver=resolver) # type: ignore[reportUnknownArgumentType]
200200

201201

202202
def _fail_to_retrieve(uri: URI):
@@ -230,10 +230,10 @@ class Registry(Mapping[URI, Resource[D]]):
230230

231231
_resources: HashTrieMap[URI, Resource[D]] = field(
232232
default=HashTrieMap(),
233-
converter=HashTrieMap.convert, # type: ignore[reportGeneralTypeIssues] # noqa: E501
233+
converter=HashTrieMap.convert, # type: ignore[reportGeneralTypeIssues]
234234
alias="resources",
235235
)
236-
_anchors: HashTrieMap[tuple[URI, str], AnchorType[D]] = HashTrieMap() # type: ignore[reportGeneralTypeIssues] # noqa: E501
236+
_anchors: HashTrieMap[tuple[URI, str], AnchorType[D]] = HashTrieMap() # type: ignore[reportGeneralTypeIssues]
237237
_uncrawled: HashTrieSet[URI] = EMPTY_UNCRAWLED
238238
_retrieve: Retrieve[D] = field(default=_fail_to_retrieve, alias="retrieve")
239239

@@ -468,8 +468,8 @@ def combine(self, *registries: Registry[D]) -> Registry[D]:
468468
uncrawled = self._uncrawled
469469
retrieve = self._retrieve
470470
for registry in registries:
471-
resources = resources.update(registry._resources) # type: ignore[reportUnknownMemberType] # noqa: E501
472-
anchors = anchors.update(registry._anchors) # type: ignore[reportUnknownMemberType] # noqa: E501
471+
resources = resources.update(registry._resources) # type: ignore[reportUnknownMemberType]
472+
anchors = anchors.update(registry._anchors) # type: ignore[reportUnknownMemberType]
473473
uncrawled = uncrawled.update(registry._uncrawled)
474474

475475
if registry._retrieve is not _fail_to_retrieve:

referencing/jsonschema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def maybe_in_subresource(
556556

557557
def specification_with(
558558
dialect_id: URI,
559-
default: Specification[Any] = None, # type: ignore[reportGeneralTypeIssues] # noqa: E501
559+
default: Specification[Any] = None, # type: ignore[reportGeneralTypeIssues]
560560
) -> Specification[Any]:
561561
"""
562562
Retrieve the `Specification` with the given dialect identifier.

0 commit comments

Comments
 (0)