From 8999d3613023380a9b7a5143cebbb666adccfa54 Mon Sep 17 00:00:00 2001 From: sandeepsuryaprasad Date: Mon, 28 Oct 2024 19:22:42 +0530 Subject: [PATCH 1/3] moved isort,black and docformatter settings to pyproject.toml --- py/pyproject.toml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/py/pyproject.toml b/py/pyproject.toml index 87d451bbf987f..8a5e26071de6a 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -61,3 +61,19 @@ ignore_missing_imports = true [[tool.mypy._winreg]] # suppress error messages about imports that cannot be resolved. ignore_missing_imports = true + +[tool.isort] +# isort is a common python tool for keeping imports nicely formatted. +# Automatically keep imports alphabetically sorted, on single lines in +# PEP recommended sections (https://peps.python.org/pep-0008/#imports) +# files or individual lines can be ignored via `# isort:skip|# isort:skip_file`. +profile = "black" +py_version=38 +force_single_line = true + +[tool.black] +line-length = 120 +target-version = ['py38'] + +[tool.docformatter] +recursive = true From 5701cbd07a91530e696f9c9d13be6760f6608afc Mon Sep 17 00:00:00 2001 From: sandeepsuryaprasad Date: Mon, 28 Oct 2024 19:40:17 +0530 Subject: [PATCH 2/3] moved isort, black and docformatter settings to pyproject.toml --- py/tox.ini | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/py/tox.ini b/py/tox.ini index f454af1ee3347..fefb4daa3997f 100644 --- a/py/tox.ini +++ b/py/tox.ini @@ -25,17 +25,6 @@ deps = trio-typing==0.7.0 commands = mypy --install-types {posargs} - -[isort] -; isort is a common python tool for keeping imports nicely formatted. -; Automatically keep imports alphabetically sorted, on single lines in -; PEP recommended sections (https://peps.python.org/pep-0008/#imports) -; files or individual lines can be ignored via `# isort:skip|# isort:skip_file`. -profile = black -py_version=38 -force_single_line = True - - [testenv:linting-ci] ; checks linting for CI with stricter exiting when failing. skip_install = true From f3179c9e01945aeee3484093b64ee719aefff5bd Mon Sep 17 00:00:00 2001 From: sandeepsuryaprasad Date: Mon, 28 Oct 2024 19:54:31 +0530 Subject: [PATCH 3/3] removed redundant pytest settings from setup.cfg --- py/setup.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/py/setup.cfg b/py/setup.cfg index 0cda7cace9e8c..c8eb38080b7d3 100644 --- a/py/setup.cfg +++ b/py/setup.cfg @@ -4,8 +4,3 @@ exclude = .tox,docs/source/conf.py,*venv extend-ignore = E501, E203 # This does nothing for now as E501 is ignored. max-line-length = 120 - -[tool:pytest] -addopts = -ra -python_files = test_*.py *_tests.py -testpaths = test