We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f3e653 commit e657d93Copy full SHA for e657d93
src/azul/indexer/__init__.py
@@ -425,10 +425,13 @@ def parse(cls, spec: str) -> Self:
425
426
@classmethod
427
def _parse(cls, spec: str) -> tuple[str, Prefix | None]:
428
- rest, sep, prefix = spec.rpartition(':')
429
- assert sep != '', R('Invalid source specification', spec)
430
- prefix = Prefix.parse(prefix) if prefix else None
431
- return rest, prefix
+ try:
+ rest, prefix = spec.rsplit(':', 1)
+ except ValueError:
+ assert False, R('Invalid source specification', spec)
432
+ else:
433
+ parsed_prefix = Prefix.parse(prefix) if prefix else None
434
+ return rest, parsed_prefix
435
436
@property
437
def _prefix_str(self) -> str:
0 commit comments