|
15 | 15 | EMPTY_RESOURCES: PMap[URI, Resource[Any]] = pmap({}, pre_size=64) |
16 | 16 | EMPTY_ANCHORS = cast(PMap[tuple[URI, str], AnchorType[Any]], EMPTY_RESOURCES) |
17 | 17 | EMPTY_UNCRAWLED: PSet[URI] = pset(pre_size=128) |
| 18 | +EMPTY_PREVIOUS_RESOLVERS: PList[URI] = plist() |
18 | 19 |
|
19 | 20 |
|
20 | 21 | class _MaybeInSubresource(Protocol[D]): |
@@ -382,14 +383,14 @@ def combine(self, *registries: Registry[D]) -> Registry[D]: |
382 | 383 | """ |
383 | 384 | if registries == (self,): |
384 | 385 | return self |
385 | | - anchors = self._anchors |
386 | 386 | resources = self._resources |
| 387 | + anchors = self._anchors |
387 | 388 | uncrawled = self._uncrawled |
388 | 389 | retrieve = self._retrieve |
389 | 390 | for registry in registries: |
390 | | - anchors = anchors.update(registry._anchors) # type: ignore[reportUnknownMemberType] # noqa: E501 |
391 | 391 | resources = resources.update(registry._resources) # type: ignore[reportUnknownMemberType] # noqa: E501 |
392 | | - uncrawled = uncrawled.update(registry._uncrawled) # type: ignore[reportUnknownMemberType] # noqa: E501 |
| 392 | + anchors = anchors.update(registry._anchors) # type: ignore[reportUnknownMemberType] # noqa: E501 |
| 393 | + uncrawled = uncrawled.update(registry._uncrawled) |
393 | 394 |
|
394 | 395 | if registry._retrieve != _fail_to_retrieve: |
395 | 396 | if registry._retrieve != retrieve != _fail_to_retrieve: |
@@ -453,7 +454,7 @@ class Resolver(Generic[D]): |
453 | 454 | _base_uri: str = field(alias="base_uri") |
454 | 455 | _registry: Registry[D] = field(alias="registry") |
455 | 456 | _previous: PList[URI] = field( |
456 | | - default=plist(), # type: ignore[reportUnknownArgumentType] |
| 457 | + default=EMPTY_PREVIOUS_RESOLVERS, |
457 | 458 | repr=False, |
458 | 459 | alias="previous", |
459 | 460 | ) |
|
0 commit comments