From 74fe49e99c26f8c80773acaf4d7307dbb70a49cb Mon Sep 17 00:00:00 2001 From: konstantin Date: Thu, 21 Mar 2024 12:26:30 +0100 Subject: [PATCH 1/2] Enable `truethy-bool` in mypy by default https://mypy.readthedocs.io/en/stable/error_code_list2.html#check-that-expression-is-not-implicitly-true-in-boolean-context-truthy-bool background: https://github.com/pylint-dev/pylint/issues/9502#issuecomment-2011874962 --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dda2231..29cdc8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,12 +34,13 @@ profile = "black" [tool.pylint."MESSAGES CONTROL"] max-line-length = 120 +[mypy] +truethy-bool = True + [build-system] requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"] build-backend = "hatchling.build" - - [tool.hatch.metadata.hooks.fancy-pypi-readme] content-type = "text/markdown" fragments = [{ path = "README.md" }] From 87c8e216eac884700b5dba20db84fef0967bcd94 Mon Sep 17 00:00:00 2001 From: konstantin Date: Thu, 21 Mar 2024 12:29:02 +0100 Subject: [PATCH 2/2] =?UTF-8?q?I=20hate=20=20=CC=B7y=CC=B7a=CC=B7m=CC=B7l?= =?UTF-8?q?=CC=B7=20toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 29cdc8b..3f3b672 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ profile = "black" max-line-length = 120 [mypy] -truethy-bool = True +truethy-bool = true [build-system] requires = ["hatchling>=1.8.0", "hatch-vcs", "hatch-fancy-pypi-readme"]