(cls, format_id: int | None, gtrid: str, bqual: str | None)
| 62 | |
| 63 | @classmethod |
| 64 | def from_parts(cls, format_id: int | None, gtrid: str, bqual: str | None) -> Xid: |
| 65 | if format_id is not None: |
| 66 | if bqual is None: |
| 67 | raise TypeError("if format_id is specified, bqual must be too") |
| 68 | if not 0 <= format_id < 0x80000000: |
| 69 | raise ValueError("format_id must be a non-negative 32-bit integer") |
| 70 | if len(bqual) > 64: |
| 71 | raise ValueError("bqual must be not longer than 64 chars") |
| 72 | if len(gtrid) > 64: |
| 73 | raise ValueError("gtrid must be not longer than 64 chars") |
| 74 | |
| 75 | elif bqual is None: |
| 76 | raise TypeError("if format_id is None, bqual must be None too") |
| 77 | |
| 78 | return Xid(format_id, gtrid, bqual) |
| 79 | |
| 80 | def _as_tid(self) -> str: |
| 81 | """ |
no test coverage detected