Skip to content

chore: improve type annotations #3

chore: improve type annotations

chore: improve type annotations #3

Triggered via pull request May 17, 2024 00:46
Status Failure
Total duration 24s
Artifacts

pyright.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
pyright: dpdata/ase_calculator.py#L5
Import "ase.calculators.calculator" could not be resolved (reportMissingImports)
pyright: dpdata/ase_calculator.py#L16
Import "ase" could not be resolved (reportMissingImports)
pyright: dpdata/ase_calculator.py#L71
"get_pbc" is not a known attribute of "None" (reportOptionalMemberAccess)
pyright: dpdata/ase_calculator.py#L77
"get_volume" is not a known attribute of "None" (reportOptionalMemberAccess)
pyright: dpdata/bond_order_system.py#L106
Import "rdkit.Chem" could not be resolved (reportMissingImports)
pyright: dpdata/driver.py#L11
Import "ase.calculators.calculator" could not be resolved (reportMissingImports)
pyright: dpdata/system.py#L46
Import "parmed" could not be resolved (reportMissingImports)
pyright: dpdata/system.py#L313
Argument of type "int | slice | list[Unknown] | ndarray[Unknown, Unknown]" cannot be assigned to parameter "f_idx" of type "Integral" in function "sub_system"   Type "int | slice | list[Unknown] | ndarray[Unknown, Unknown]" is incompatible with type "Integral"     "int" is incompatible with "Integral" (reportArgumentType)
pyright: dpdata/system.py#L453
Expression of type "NDArray[Any]" is incompatible with declared type "Integral"   "ndarray[Any, dtype[Any]]" is incompatible with "Integral" (reportAssignmentType)
pyright: dpdata/system.py#L463
No overloads for "__setitem__" match the provided arguments (reportCallIssue)