From 6a24b41bee93e332a4d0e9994f39c8a14e2356d9 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Thu, 5 Jan 2023 14:51:19 +0100 Subject: [PATCH] Recommend hatch and add more linting in the pyproject.toml proposal --- README.org | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/README.org b/README.org index d09b8ad..0fdc8c7 100644 --- a/README.org +++ b/README.org @@ -4612,14 +4612,8 @@ Complete the result with \"system\"." #+caption: Kickoff =pyproject.toml= proposal. #+name: lst:pyproject-toml-kickoff #+begin_src toml :tangle pyproject.toml -# [project] -# name = "catchy-name" -# version = "0.0.1" -# description = "Catchy Acronym Description" - -# [build-system] -# requires = [ "setuptools>=61.0" ] -# build-backend = "setuptools.build_meta" +# Use for instance "hatch new" to create or initialize a project. +# See: https://pypi.org/project/hatch [tool.black] line-length = 88 @@ -4630,21 +4624,26 @@ select = [ "ARG", # flake8-unused-arguments "B", # flake8-bugbear "C", # mccabe + "C4", # flake8-comprehensions "E", # pycodestyle "D", # pydocstyle "F", # pyflakes -# "W", # ruff emits no pycodestyle warnings yet + "UP", # pyupgrade + "W", # pycodestyle ] ignore = [ - "D107", # ignore: missing docstring in __init__ - "D203", # ignore: single blank line required before class docstring - "D212", # ignore: multi-line docstring summary should start at the first line - "D213", # ignore: multi-line docstring summary should start at the second line - "D402", # ignore: first line should not be the function signature - "D413", # ignore: missing blank line after last section - "D415", # ignore: 1st line should end with a ".", "?", or "?" - "D416", # ignore: section name should end with a ":" - "D417", # ignore: missing argument descriptions in the docstring + "B905", # `zip()` without an explicit `strict=` parameter + # https://www.pydocstyle.org/en/stable/error_codes.html#default-conventions + # pydocstyle numpy convention: + # "D107", # missing docstring in __init__ + # "D203", # single blank line required before class docstring + # "D212", # multi-line docstring summary should start at the first line + # "D213", # multi-line docstring summary should start at the second line + # "D402", # first line should not be the function signature + # "D413", # missing blank line after last section + # "D415", # 1st line should end with a ".", "?", or "?" + # "D416", # section name should end with a ":" + # "D417", # missing argument descriptions in the docstring ] [tool.ruff.mccabe]