-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add typings for DataUrl #3968
Add typings for DataUrl #3968
Conversation
assert(file_path is None) | ||
assert(data_path is None) | ||
assert(data_slice is None) | ||
assert(scheme is None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes are due to auto-formatting by black. Sorry !
EDIT: I guess it is fine in the end: #3819
""" | ||
self.__path = path | ||
# only replace if ? not here already. Otherwise can mess sith | ||
# data_slice if == ::2 for example | ||
if '?' not in path: | ||
if "?" not in path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black black black
|
||
:rtype: str | ||
""" | ||
def data_path(self) -> str | None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_path
can be None
if path
is used to construct the DataUrl
.
a0c2677
to
8e48652
Compare
return self.__data_path | ||
|
||
def data_slice(self): | ||
def data_slice(self) -> tuple[SliceLike, ...] | None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_slice
can also be None
if no slice is specified.
120f133
to
df0d1e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
df0d1e0
to
aead106
Compare
No description provided.