diff options
author | Matthias Baumgartner <dev@igsor.net> | 2022-12-18 13:42:34 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2022-12-18 13:42:34 +0100 |
commit | 0e52514639b043454425a9cc2317d27e628a1027 (patch) | |
tree | e9630257a423521ec3aa6c83f6b56a0b2a581bc2 /bsfs/utils/uri.py | |
parent | 21a02197d73f263ae222f2ccc49248d8617e2d7d (diff) | |
download | bsfs-0e52514639b043454425a9cc2317d27e628a1027.tar.gz bsfs-0e52514639b043454425a9cc2317d27e628a1027.tar.bz2 bsfs-0e52514639b043454425a9cc2317d27e628a1027.zip |
namespace and uri extensions
Diffstat (limited to 'bsfs/utils/uri.py')
-rw-r--r-- | bsfs/utils/uri.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/bsfs/utils/uri.py b/bsfs/utils/uri.py index a56423a..84854a4 100644 --- a/bsfs/utils/uri.py +++ b/bsfs/utils/uri.py @@ -193,4 +193,54 @@ class URI(str): # return the default value return default + + # overload composition methods + + def __add__(self, *args) -> 'URI': + return URI(super().__add__(*args)) + + def join(self, *args) -> 'URI': + return URI(super().join(*args)) + + def __mul__(self, *args) -> 'URI': + return URI(super().__mul__(*args)) + + def __rmul__(self, *args) -> 'URI': + return URI(super().__rmul__(*args)) + + + # overload casefold methods + + def lower(self, *args) -> 'URI': + return URI(super().lower(*args)) + + def upper(self, *args) -> 'URI': + return URI(super().upper(*args)) + + + # overload stripping methods + + def strip(self, *args) -> 'URI': + return URI(super().strip(*args)) + + def lstrip(self, *args) -> 'URI': + return URI(super().lstrip(*args)) + + def rstrip(self, *args) -> 'URI': + return URI(super().rstrip(*args)) + + + # overload formatting methods + + def format(self, *args, **kwargs) -> 'URI': + return URI(super().format(*args, **kwargs)) + + def __mod__(self, *args) -> 'URI': + return URI(super().__mod__(*args)) + + def replace(self, *args) -> 'URI': + return URI(super().replace(*args)) + + + ## EOF ## |