mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-18 00:21:31 +00:00
feat(backend): add typechecking with ty (#9664)
* Add ty for type checking * fix various typing issues * fix req * more fixes * and more types * and more typing * fix imports * more fixes * fix types and optional statements * ensure patch only runs if it is installed * add type check to qc * more fixes * install all reqs * fix more types * more fixes * disable container stuff for now * move typecheck to seperate job * try to use putput for path * use env instead * fix typo * add missing install * remove unclear imports - not sure why this was done * add kwarg names * fix introduced issue in url call * ignore import * fix broken typing changes * fix filter import * reduce change set * remove api-change * fix dict * ignore typing errors * fix more type issues * ignore errors * style fix * fix type * bump ty * fix more * type fixes * update ignores * fix import * fix defaults * fix ignore * fix some issues * fix type
This commit is contained in:
@@ -101,6 +101,20 @@ python-version = "3.9.2"
|
||||
no-strip-extras=true
|
||||
generate-hashes=true
|
||||
|
||||
[tool.ty.src]
|
||||
root = "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
|
||||
call-non-callable="ignore" # 8 ##
|
||||
invalid-return-type="ignore" # 22 ##
|
||||
invalid-argument-type="ignore" # 49
|
||||
possibly-unbound-attribute="ignore" # 25 # https://github.com/astral-sh/ty/issues/164
|
||||
unknown-argument="ignore" # 3 # need to wait for betterdjango field stubs
|
||||
invalid-assignment="ignore" # 17 # need to wait for betterdjango field stubs
|
||||
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["src/backend/InvenTree", "InvenTree"]
|
||||
dynamic_context = "test_function"
|
||||
|
Reference in New Issue
Block a user