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:
@@ -4,7 +4,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
from datetime import datetime
|
||||
from distutils.version import StrictVersion
|
||||
from distutils.version import StrictVersion # type: ignore[import]
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
|
@@ -126,7 +126,7 @@ def check_link(url) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def get_build_environment() -> str:
|
||||
def get_build_environment() -> Optional[str]:
|
||||
"""Returns the branch we are currently building on, based on the environment variables of the various CI platforms."""
|
||||
# Check if we are in ReadTheDocs
|
||||
if os.environ.get('READTHEDOCS') == 'True':
|
||||
|
Reference in New Issue
Block a user