From a78f8a0495c5d8e516912ae4be77e3a4af2e4ea8 Mon Sep 17 00:00:00 2001 From: Saurav Maheshkar Date: Thu, 23 Feb 2023 11:34:18 +0000 Subject: [PATCH] style: move isort and pytest config to pyproject --- pyproject.toml | 24 ++++++++++++++++++++++++ setup.cfg | 20 -------------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b7465bb..1947fa5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,27 @@ [tool.black] line-length = 119 target-version = ['py36'] + +[tool.isort] +line_length = 119 +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true +ensure_newline_before_comments = true +lines_after_imports = 2 +default_section = "FIRSTPARTY" +known_first_party = "pet" +known_third_party = [ + "numpy", + "torch", + "accelerate", + "transformers", +] + +[tool.pytest.ini_options] +doctest_optionflags = [ + "NUMBER", + "NORMALIZE_WHITESPACE", + "ELLIPSIS", +] diff --git a/setup.cfg b/setup.cfg index 6b26312..ab1382c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,23 +1,3 @@ -[isort] -default_section = FIRSTPARTY -ensure_newline_before_comments = True -force_grid_wrap = 0 -include_trailing_comma = True -known_first_party = pet -known_third_party = - numpy - torch - accelerate - transformers - -line_length = 119 -lines_after_imports = 2 -multi_line_output = 3 -use_parentheses = True - [flake8] ignore = E203, E722, E501, E741, W503, W605 max-line-length = 119 - -[tool:pytest] -doctest_optionflags=NUMBER NORMALIZE_WHITESPACE ELLIPSIS \ No newline at end of file