Types
invoke_tasklib.typecheck ¶
Type-checking task (types.check).
The module is named typecheck so that it does not shadow the
standard library module types; its namespace is types, see
NAMESPACE.
invoke_tasklib.typecheck.NAMESPACE
module-attribute
¶
NAMESPACE = 'types'
The name of the namespace of the tasks of this module.
invoke_tasklib.typecheck.check ¶
check(
c: Context,
*,
complete: bool = False,
args: str | None = None,
paths: str | None = None,
pyright_args: str | None = None,
) -> None
Check type hints.
The checker is tasklib.types.checker (ty by default, or
pyright or mypy). Two modes are available:
- fast (default): only the checker is used.
- complete (
--complete):pyrightis also run after the checker, unless the checker ispyright.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
c
|
Context
|
The invoke context. |
required |
complete
|
bool
|
If |
False
|
args
|
str | None
|
Extra arguments passed to the checker (not to the extra
|
None
|
paths
|
str | None
|
The files or directories to check instead of the
project default, passed to the checker and |
None
|
pyright_args
|
str | None
|
Extra arguments passed to the extra |
None
|