2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

fix(backend): enforce docstring args (#9428)

* enforce docstring args

* add more rules that we could add later

* fix missing yields

* add a type

* make 3.9 compat
This commit is contained in:
Matthias Mair
2025-04-04 00:02:55 +02:00
committed by GitHub
parent b48ceb00f2
commit a2370dbe59
21 changed files with 98 additions and 47 deletions

View File

@ -172,6 +172,7 @@ def content_excludes(
"""Returns a list of content types to exclude from import / export.
Arguments:
allow_auth (bool): Allow user authentication data to be exported / imported
allow_tokens (bool): Allow tokens to be exported / imported
allow_plugins (bool): Allow plugin information to be exported / imported
allow_sso (bool): Allow SSO tokens to be exported / imported
@ -243,6 +244,7 @@ def run(c, cmd, path: Optional[Path] = None, pty=False, env=None):
cmd: Command to run.
path: Path to run the command in.
pty (bool, optional): Run an interactive session. Defaults to False.
env (dict, optional): Environment variables to pass to the command. Defaults to None.
"""
env = env or {}
path = path or localDir()
@ -1082,7 +1084,8 @@ def test(
):
"""Run unit-tests for InvenTree codebase.
Arguments:
Args:
c: Command line context.
disable_pty (bool): Disable PTY (default = False)
runtest (str): Specify which tests to run, in format <module>.<file>.<class>.<method> (default = '')
migrations (bool): Run migration unit tests (default = False)
@ -1394,6 +1397,7 @@ def frontend_trans(c, extract: bool = True):
Args:
c: Context variable
extract (bool): Whether to extract translations from source code. Defaults to True.
"""
info('Compiling frontend translations')
if extract: