diff --git a/scripts/calculate_hashes_blob_storage.py b/scripts/calculate_hashes_blob_storage.py index a98f1a42..c8183401 100644 --- a/scripts/calculate_hashes_blob_storage.py +++ b/scripts/calculate_hashes_blob_storage.py @@ -1,7 +1,7 @@ import argparse -from azure.storage.blob import BlobServiceClient import hashlib +from azure.storage.blob import BlobServiceClient parser = argparse.ArgumentParser() parser.add_argument("storage_account_url", help="Storage account url") diff --git a/scripts/calculate_hashes_s3.py b/scripts/calculate_hashes_s3.py index 8cfc562e..522fdf50 100644 --- a/scripts/calculate_hashes_s3.py +++ b/scripts/calculate_hashes_s3.py @@ -1,7 +1,7 @@ import argparse -import boto3 import hashlib +import boto3 parser = argparse.ArgumentParser() parser.add_argument("s3_bucket", help="S3 Bucket name") diff --git a/setup.py b/setup.py index a0dfc794..7f57b64d 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ ] EXTRAS["server"] = ["waitress"] -EXTRAS["lint"] = ["black", "pylint==2.3.1", "mypy", "sqlalchemy-stubs"] +EXTRAS["lint"] = ["black", "pylint==2.3.1", "mypy", "sqlalchemy-stubs", "isort"] EXTRAS["doc"] = ["numpydoc", "sphinx", "sphinx_rtd_theme"] diff --git a/tox.ini b/tox.ini index e90c461a..70caf978 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,6 @@ commands = coverage run --source=pypicloud --branch setup.py nosetests --verbosity=2 [testenv:lint] -basepython = python3 extras = {[testenv]extras} lint @@ -38,3 +37,11 @@ deps = commands = coverage run --source=pypicloud --branch setup.py nosetests coverage html + +[testenv:format] +extras = + {[testenv]extras} + lint +commands = + isort -y -ac -rc pypicloud tests setup.py scripts + black pypicloud tests setup.py scripts