Update black targets so we also format Python files in the root of the
project directory.
@@ -269,7 +269,10 @@ commands = flake8 --config ./.flake8 libcloud/
[testenv:black]
deps = -r{toxinidir}/requirements-tests.txt
black==21.10b0; python_version >= '3.6' and implementation_name == "cpython"
-commands = black --config pyproject.toml libcloud/
+# NOTE: We need to use bash -c otherwise black will quote the argument and it
+# won't expand to the list of files when the command runs
+commands =
+ bash -c "black --config pyproject.toml *.py"
black --config pyproject.toml docs/examples/
black --config pyproject.toml demos/
black --config pyproject.toml contrib/
@@ -278,7 +281,11 @@ commands = black --config pyproject.toml libcloud/
[testenv:black-check]
deps = -r{toxinidir}/requirements-tests.txt
black==21.10b0; python_version >= '3.6' and implementation_name == "cpython"
-commands = black --config pyproject.toml --check libcloud/
+# NOTE: We need to use bash -c otherwise black will quote the argument and it
+# won't expand to the list of files when the command runs
+commands =
+ bash -c "black --config pyproject.toml *.py"
+ black --config pyproject.toml --check libcloud/
black --config pyproject.toml --check docs/examples/
black --config pyproject.toml --check demos/
black --config pyproject.toml --check contrib/
