Skip to content

Commit cb24f96

Browse files
committed
Minor style.
1 parent a72ccad commit cb24f96

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

referencing/_core.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def complain(this):
1515
raise UnsupportedSubclassing(
1616
"Subclassing is not part of referencing's public API. "
1717
"If no other suitable API exists for what you're trying to do, "
18-
"feel free to file an issue asking for one."
18+
"feel free to file an issue asking for one.",
1919
)
2020

2121

@@ -83,7 +83,7 @@ def added_to(self, registry: Registry):
8383
class Registry:
8484

8585
_contents: PMap[str, tuple[Schema, PMap[str, Schema]]] = attrs.field(
86-
default=m(), repr=lambda value: f"({len(value)} entries)"
86+
default=m(), repr=lambda value: f"({len(value)} entries)",
8787
)
8888

8989
def resource_at(self, uri):
@@ -145,10 +145,7 @@ def lookup(self, ref: str):
145145
uri, fragment = urldefrag(urljoin(self._base_uri, ref))
146146
if self._registry.has_not_crawled(uri):
147147
root, _ = self._registry.resource_at(self._base_uri)
148-
for each in find_subresources(
149-
initial_base_uri=self._base_uri,
150-
root=root,
151-
):
148+
for each in find_subresources(base_uri=self._base_uri, root=root):
152149
self._registry = each.added_to(self._registry)
153150

154151
resource, anchors = self._registry.resource_at(uri)
@@ -176,7 +173,7 @@ def with_root(self, root) -> Resolver:
176173
else:
177174
uri = urljoin(self._base_uri, maybe_relative)
178175
registry = self._registry.with_identified_resource(
179-
uri=uri, resource=root
176+
uri=uri, resource=root,
180177
)
181178
return attrs.evolve(self, base_uri=uri, registry=registry)
182179

@@ -194,9 +191,9 @@ def id_of(resource) -> str | None:
194191

195192
def find_subresources(
196193
root: Schema,
197-
initial_base_uri: str,
194+
base_uri: str,
198195
) -> Iterable[Anchor | DynamicAnchor | IdentifiedResource]:
199-
resources = [(initial_base_uri, root)]
196+
resources = [(base_uri, root)]
200197
while resources:
201198
base_uri, resource = resources.pop()
202199
if resource is True or resource is False:

0 commit comments

Comments
 (0)