(self)
| 699 | return self._host.lstrip("[").rstrip("]") |
| 700 | |
| 701 | def canonical_path(self): |
| 702 | if self.proto in ("file", "socket"): |
| 703 | return self.path |
| 704 | if self.proto == "rclone": |
| 705 | return f"{self.proto}:{self.path}" |
| 706 | if self.proto in ("sftp", "ssh", "s3", "b2", "http", "https"): |
| 707 | return ( |
| 708 | f"{self.proto}://" |
| 709 | f"{(self.user + '@') if self.user else ''}" |
| 710 | f"{self._host if self._host else ''}" |
| 711 | f"{self.port if self.port else ''}/" |
| 712 | f"{self.path}" |
| 713 | ) |
| 714 | raise NotImplementedError(self.proto) |
| 715 | |
| 716 | def with_timestamp(self, timestamp): |
| 717 | # note: this only affects the repository URL/path, not the archive name! |
no outgoing calls
no test coverage detected