Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Commit

Permalink
Add a command 'tox -e format' to autoformat repo
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Jun 6, 2020
1 parent f9ca831 commit 84e5b7a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/calculate_hashes_blob_storage.py
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
2 changes: 1 addition & 1 deletion scripts/calculate_hashes_s3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse
import boto3
import hashlib

import boto3

parser = argparse.ArgumentParser()
parser.add_argument("s3_bucket", help="S3 Bucket name")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand Down
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ commands =
coverage run --source=pypicloud --branch setup.py nosetests --verbosity=2

[testenv:lint]
basepython = python3
extras =
{[testenv]extras}
lint
Expand All @@ -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

0 comments on commit 84e5b7a

Please sign in to comment.