diff --git a/.circleci/config.yml b/.circleci/config.yml index 5fc7bfad4a3..7ed65de73cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -244,7 +244,7 @@ jobs: key: v0.3-code_quality-{{ checksum "setup.py" }} paths: - '~/.cache/pip' - - run: black --check --line-length 119 --target-version py35 examples templates tests src utils + - run: black --check examples templates tests src utils - run: isort --check-only examples templates tests src utils - run: flake8 examples templates tests src utils - run: python utils/check_copies.py diff --git a/Makefile b/Makefile index 83998723fc5..6aef4b10f7c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Check that source code meets quality standards quality: - black --check --line-length 119 --target-version py35 examples templates tests src utils + black --check examples templates tests src utils isort --check-only examples templates tests src utils flake8 examples templates tests src utils python utils/check_copies.py @@ -12,7 +12,7 @@ quality: # Format source code automatically style: - black --line-length 119 --target-version py35 examples templates tests src utils + black examples templates tests src utils isort examples templates tests src utils # Make marked copies of snippets of codes conform to the original diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000000..291558c9a3d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.black] +line-length = 119 +target-version = ['py35']