Skip to content

[pre-commit.ci] auto fixes from pre-commit.com hooks

a9f844b
Select commit
Loading
Failed to load commit list.
Merged

style(tf): add type annotations #4945

[pre-commit.ci] auto fixes from pre-commit.com hooks
a9f844b
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / CodeQL succeeded Feb 2, 2026 in 2s

No new alerts in code changed by this pull request

Annotations

Check failure on line 40 in deepmd/tf/modifier/dipole_charge.py

See this annotation in the file changed.

Code scanning / CodeQL

Missing call to superclass `__init__` during object initialization Error

This class does not call
BaseModifier.__init__
during initialization. (
DipoleChargeModifier.__init__
may be missing a call to a base class __init__)

Check failure on line 89 in deepmd/tf/nvnmd/entrypoints/train.py

See this annotation in the file changed.

Code scanning / CodeQL

Modification of parameter with default Error

This expression mutates a
default value
.
This expression mutates a
default value
.
This expression mutates a
default value
.

Check failure on line 93 in deepmd/tf/nvnmd/entrypoints/train.py

See this annotation in the file changed.

Code scanning / CodeQL

Modification of parameter with default Error

This expression mutates a
default value
.
This expression mutates a
default value
.
This expression mutates a
default value
.

Check failure on line 106 in deepmd/tf/nvnmd/entrypoints/train.py

See this annotation in the file changed.

Code scanning / CodeQL

Modification of parameter with default Error

This expression mutates a
default value
.
This expression mutates a
default value
.
This expression mutates a
default value
.

Check failure on line 111 in deepmd/tf/nvnmd/entrypoints/train.py

See this annotation in the file changed.

Code scanning / CodeQL

Modification of parameter with default Error

This expression mutates a
default value
.
This expression mutates a
default value
.
This expression mutates a
default value
.

Check notice on line 377 in deepmd/tf/nvnmd/entrypoints/mapt.py

See this annotation in the file changed.

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.

Check notice on line 57 in deepmd/tf/nvnmd/utils/weight.py

See this annotation in the file changed.

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.

Check notice on line 110 in deepmd/tf/nvnmd/utils/weight.py

See this annotation in the file changed.

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.