From 5341c0f1e47a5e7db8b94ecc4700fd1343ab5eba Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 11 Mar 2024 10:13:28 +0100 Subject: [PATCH 1/2] Make Mypy pretty --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 4a3e57501..252c07531 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -270,5 +270,6 @@ showcontent = true [tool.mypy] +pretty = true disallow_untyped_defs = true check_untyped_defs = true From 1cb58a5536e3ba2591aa49988c5f525850d9b7e5 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Tue, 12 Mar 2024 19:12:43 +0100 Subject: [PATCH 2/2] Fixed make_class example. (#1258) The example only makes sense if `C2` is the class examined, as that's the one we dynamically created. --- docs/examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples.md b/docs/examples.md index 0f8301aa5..15f8beee5 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -689,7 +689,7 @@ Sometimes you may want to create a class programmatically. >>> C2 = make_class("C2", {"x": field(type=int), "y": field()}) >>> fields(C1) == fields(C2) True ->>> fields(C1).x.type +>>> fields(C2).x.type ```