🎨 Convert type comments into Python type hints (#4575)

* com2ann: Convert type comments into Python type hints - again

* Make modifications based on code review
This commit is contained in:
Christian Clauss authored and GitHub committed 2022-08-01 09:23:56 +02:00
1 parent 936af41d0e
commit 8680ca4495
4 files changed
+11 -21

No files matched your search

+2 -2
View File
@@ -164,7 +164,7 @@ class StorageInterface:
:param string path: the path of the new folder
:param bool ignore_existing: if set to True, no error will be raised if the folder to be added already exists
:param unicode display: display name of the folder
:param str display: display name of the folder
:return: the sanitized name of the new folder to be used for future references to the folder
"""
raise NotImplementedError()
@@ -220,7 +220,7 @@ class StorageInterface:
:param list links: any links to add with the file
:param bool allow_overwrite: if set to True no error will be raised if the file already exists and the existing file
and its metadata will just be silently overwritten
:param unicode display: display name of the file
:param str display: display name of the file
:return: the sanitized name of the file to be used for future references to it
"""
raise NotImplementedError()
+2 -3
View File
@@ -77,7 +77,7 @@ def to_unicode(
s_or_u: Union[str, bytes], encoding: str = "utf-8", errors: str = "strict"
) -> str:
"""
Make sure ``s_or_u`` is a unicode string (str).
Make sure ``s_or_u`` is a string (str).
Arguments:
s_or_u (str or bytes): The value to convert
@@ -202,7 +202,6 @@ def warning_factory(warning_type):
"__dict__",
"__doc__",
"__str__",
"__unicode__",
"__repr__",
"__getattribute__",
"__setattr__",
@@ -1611,7 +1610,7 @@ class CaseInsensitiveSet(Set):
"""
Basic case insensitive set
Any str or unicode values will be stored and compared in lower case. Other value types are left as-is.
Any str values will be stored and compared in lower case. Other value types are left as-is.
"""
def __init__(self, *args):