2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-07-04 14:10:52 +00:00

chore(backend): typing fixes (#12247)

* bump ty

* various fixes

* fix settings

* bump stubs

* update pre-commit setup

* update ignore

* fix various issues

* fix style

* fix ignores

* fix wrong ty warnings

* ignore __class__ type checking errors
see https://github.com/astral-sh/ty/issues/3122

* fix exception logging

* update ignoring

* bump ty further

* add cleanup cmd

* Merge branch 'master' of https://github.com/inventree/InvenTree into typechecking-remove-ignore

* bump ty

* remove now unused class ignores
This commit is contained in:
Matthias Mair
2026-06-26 00:04:36 +02:00
committed by GitHub
parent e847d96a88
commit 8f73d9291b
5 changed files with 52 additions and 48 deletions
+8 -9
View File
@@ -105,17 +105,16 @@ generate-hashes=true
extra-paths = ["src/backend/InvenTree"]
[tool.ty.rules]
unresolved-reference="ignore" # 21 # see https://github.com/astral-sh/ty/issues/220
unresolved-attribute="ignore" # 505 # need Plugin Mixin typing
unresolved-attribute="ignore" # 837 # need Plugin Mixin typing
call-non-callable="ignore" # 8 ##
invalid-assignment="ignore" # 17 # need to wait for better django field stubs
invalid-method-override="ignore" # 104
invalid-return-type="ignore" # 22 ##
# possibly-missing-attribute="ignore" # 25 # https://github.com/astral-sh/ty/issues/164
unknown-argument="ignore" # 3 # need to wait for better django field stubs
invalid-assignment="ignore" # 40 # need to wait for better django field stubs
invalid-method-override="ignore" # 103
invalid-return-type="ignore" # 44 ##
invalid-argument-type="ignore" # 49
no-matching-overload="ignore" # 3 # need to wait for betterdjango field stubs
# possibly-unbound-attribute="ignore" # 21
no-matching-overload="ignore" # 10 # need to wait for betterdjango field stubs
# warn about unused ignore comments
unused-ignore-comment = "error"
[tool.coverage.run]
source = ["src/backend/InvenTree", "InvenTree"]