From b10fa0c21b067297c664b3c2cf983d377344fcee Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Mon, 19 Dec 2022 11:24:06 -0700 Subject: [PATCH] Add setup.cfg back for flake8 since it does not support pyproject.toml Signed-off-by: Travis F. Collins --- .pre-commit-config.yaml | 1 + pyproject.toml | 17 +++++------------ requirements_dev.txt | 1 + setup.cfg | 6 ++++++ 4 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 setup.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da5d4adfe..60cf37281 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,6 +8,7 @@ repos: rev: v4.3.20 hooks: - id: isort + additional_dependencies: ["toml"] #- repo: https://github.com/pre-commit/mirrors-mypy # rev: v0.720 # hooks: diff --git a/pyproject.toml b/pyproject.toml index 27dfa136c..d3ab5af5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,19 +51,12 @@ homepage = "https://analogdevicesinc.github.io/pyadi-iio/" documentation = "https://analogdevicesinc.github.io/pyadi-iio/" repository = "https://github/analogdevicesinc/pyadi-iio" -[isort] -multi_line_output="3" +[tool.isort] +multi_line_output=3 include_trailing_comma="True" -force_grid_wrap="0" +force_grid_wrap=0 use_parentheses="True" -line_length="88" +line_length=88 -[flake8] -ignore = ["E203", "E266", "E501", "W503", "F401", "F403"] -max-line-length = "88" -max-complexity = "18" -select = ["B","C","E","F","W","T4"] -exclude = ["test/*","examples/*","doc/*","images/*"] - -[mypy] +[tool.mypy] ignore_missing_imports="true" diff --git a/requirements_dev.txt b/requirements_dev.txt index 9d79ed62e..5b14a23b7 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -14,3 +14,4 @@ pytest-html plotly-express pyvisa matplotlib +pytoml diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000..a0273c586 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[flake8] +ignore = E203, E266, E501, W503, F401, F403 +max-line-length = 88 +max-complexity = 18 +select = B,C,E,F,W,T4 +exclude = test/*,examples/*,doc/*,images/*