Page MenuHomeSoftware Heritage

D2233.id7703.diff
No OneTemporary

D2233.id7703.diff

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -44,6 +44,7 @@
author_email='swh-devel@inria.fr',
url='https://forge.softwareheritage.org/diffusion/DOBJS',
packages=find_packages(),
+ python_requires='>=3.6',
install_requires=parse_requirements() + parse_requirements('swh'),
setup_requires=['vcversioner'],
extras_require={'testing': parse_requirements('test')},
diff --git a/swh/__init__.py b/swh/__init__.py
--- a/swh/__init__.py
+++ b/swh/__init__.py
@@ -1,4 +1,4 @@
from pkgutil import extend_path
from typing import Iterable
-__path__ = extend_path(__path__, __name__) # type: Iterable[str]
+__path__: Iterable[str] = extend_path(__path__, __name__)
diff --git a/swh/objstorage/__init__.py b/swh/objstorage/__init__.py
--- a/swh/objstorage/__init__.py
+++ b/swh/objstorage/__init__.py
@@ -18,13 +18,16 @@
__all__ = ['get_objstorage', 'ObjStorage']
-_STORAGE_CLASSES = {
+_STORAGE_CLASSES: Dict[
+ str,
+ Union[type, Callable[..., type]]
+] = {
'pathslicing': PathSlicingObjStorage,
'remote': RemoteObjStorage,
'memory': InMemoryObjStorage,
'weed': WeedObjStorage,
'random': RandomGeneratorObjStorage,
-} # type: Dict[str, Union[type, Callable[..., type]]]
+}
_STORAGE_CLASSES_MISSING = {
}
diff --git a/swh/objstorage/tests/test_objstorage_azure.py b/swh/objstorage/tests/test_objstorage_azure.py
--- a/swh/objstorage/tests/test_objstorage_azure.py
+++ b/swh/objstorage/tests/test_objstorage_azure.py
@@ -30,7 +30,7 @@
"""Mock internal azure library which AzureCloudObjStorage depends upon.
"""
- _data = {} # type: Dict[str, Any]
+ _data: Dict[str, Any] = {}
def __init__(self, account_name, account_key, **kwargs):
# do not care for the account_name and the api_secret_key here

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 3, 12:19 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217772

Event Timeline