Fix(UT): fix type checker error raised by pyright #249
Annotations
8 errors and 6 warnings
pyright:
fpop/abacus.py#L639
Argument of type "bool" cannot be assigned to parameter "input" of type "str | None" in function "run_command"
Type "bool" is incompatible with type "str | None"
"bool" is incompatible with "str"
"bool" is incompatible with "None" (reportArgumentType)
|
pyright:
fpop/preprun_fp.py#L94
Argument of type "List[Path] | List[str] | None" cannot be assigned to parameter "upload_python_packages" of type "List[str] | None" in function "_prep_run_fp" (reportArgumentType)
|
pyright:
fpop/preprun_fp.py#L148
Argument of type "List[str] | None" cannot be assigned to parameter "python_packages" of type "List[PathLike[Unknown]] | None" in function "__init__" (reportArgumentType)
|
pyright:
fpop/preprun_fp.py#L179
Argument of type "List[str] | None" cannot be assigned to parameter "python_packages" of type "List[PathLike[Unknown]] | None" in function "__init__" (reportArgumentType)
|
pyright:
fpop/vasp.py#L260
Argument of type "bool" cannot be assigned to parameter "input" of type "str | None" in function "run_command"
Type "bool" is incompatible with type "str | None"
"bool" is incompatible with "str"
"bool" is incompatible with "None" (reportArgumentType)
|
pyright:
tests/constants.py#L75
Cannot access attribute "to_deepmd_npy" for class "System"
Attribute "to_deepmd_npy" is unknown (reportAttributeAccessIssue)
|
pyright:
tests/test_prep_run_vasp.py#L76
Cannot access attribute "to_deepmd_npy" for class "System"
Attribute "to_deepmd_npy" is unknown (reportAttributeAccessIssue)
|
pyright
7 errors
|
pyright
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4, jakebailey/pyright-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
pyright:
tests/test_prep_run_vasp.py#L94
Expression value is unused (reportUnusedExpression)
|
pyright:
tests/test_run_abacus.py#L5
Import "mock" could not be resolved from source (reportMissingModuleSource)
|
pyright:
tests/test_run_abacus.py#L5
Import "mock.mock" could not be resolved from source (reportMissingModuleSource)
|
pyright:
tests/test_run_vasp.py#L5
Import "mock" could not be resolved from source (reportMissingModuleSource)
|
pyright:
tests/test_run_vasp.py#L5
Import "mock.mock" could not be resolved from source (reportMissingModuleSource)
|