Fix mypy context manager typing for adapter subclasses.
Return Self from __enter__ so with-blocks preserve subclass types, and align mypy python_version with the 3.12 runtime target. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
e98fd3b90d
commit
497533f0e3
+1
-1
@@ -48,7 +48,7 @@ url = "https://gitea.lille-vemmelund.dk/api/packages/brian/pypi/simple/"
|
||||
explicit = true
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
python_version = "3.12"
|
||||
warn_return_any = true # nudge to use stricter types
|
||||
warn_unused_configs = true # nudge to remove unused configs
|
||||
disallow_untyped_defs = true # disallow untyped function definitions
|
||||
|
||||
Reference in New Issue
Block a user