Closed njzjz closed 1 week ago
deepmd/pt/model/task/dos.py
48-48: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 58-58: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/pt/model/task/denoise.py
32-32: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/pt/model/task/invar_fitting.py
89-89: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 99-99: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/pt/model/task/dipole.py
82-82: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 91-91: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functionsource/tests/pt/model/test_linear_atomic_model_stat.py
179-179: Local variable `f` is assigned to but never used (F841) Remove assignment to unused variable `f`deepmd/dpmodel/fitting/dipole_fitting.py
92-92: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 105-105: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/pt/model/task/ener.py
50-50: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/dpmodel/fitting/invar_fitting.py
120-120: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 135-135: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/pt/model/task/polarizability.py
86-86: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 95-95: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functiondeepmd/dpmodel/atomic_model/base_atomic_model.py
40-40: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 41-41: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 87-87: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 97-97: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 201-201: Use `key in dict` instead of `key in dict.keys()` (SIM118) Remove `.keys()` --- 247-247: Use `key in dict` instead of `key in dict.keys()` (SIM118) Remove `.keys()`deepmd/dpmodel/fitting/polarizability_fitting.py
97-97: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 110-110: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within functionsource/tests/pt/model/test_atomic_model_atomic_stat.py
171-171: Local variable `f` is assigned to but never used (F841) Remove assignment to unused variable `f` --- 341-341: Local variable `f` is assigned to but never used (F841) Remove assignment to unused variable `f`deepmd/dpmodel/output_def.py
107-107: Use `key in dict` instead of `key in dict.keys()` (SIM118) Remove `.keys()` --- 436-436: Loop control variable `kk` not used within loop body (B007) Rename unused `kk` to `_kk`source/tests/pt/model/test_atomic_model_global_stat.py
173-173: Local variable `f` is assigned to but never used (F841) Remove assignment to unused variable `f` --- 490-490: Local variable `at` is assigned to but never used (F841) Remove assignment to unused variable `at`deepmd/pt/model/atomic_model/base_atomic_model.py
80-80: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 81-81: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 95-95: Local variable `ntypes` is assigned to but never used (F841) Remove assignment to unused variable `ntypes` --- 129-129: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 139-139: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 254-254: Use `key in dict` instead of `key in dict.keys()` (SIM118) Remove `.keys()` --- 542-542: Use `key in dict` instead of `key in dict.keys()` (SIM118) Remove `.keys()` --- 543-543: Use `key in dict` instead of `key in dict.keys()` (SIM118) Remove `.keys()`source/tests/common/dpmodel/test_output_def.py
482-482: Local variable `context` is assigned to but never used (F841) Remove assignment to unused variable `context` --- 492-492: Local variable `context` is assigned to but never used (F841) Remove assignment to unused variable `context` --- 496-496: Local variable `context` is assigned to but never used (F841) Remove assignment to unused variable `context` --- 509-509: Local variable `context` is assigned to but never used (F841) Remove assignment to unused variable `context` --- 522-522: Local variable `context` is assigned to but never used (F841) Remove assignment to unused variable `context` --- 608-608: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 609-609: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function --- 661-661: Local variable `nall` is assigned to but never used (F841) Remove assignment to unused variable `nall` --- 693-693: Do not use mutable data structures for argument defaults (B006) Replace with `None`; initialize within function
deepmd/pt/model/task/dos.py (1)
`94-94`: Correct spelling change from `reduciable` to `reducible` enhances consistency and correctness.deepmd/infer/deep_dos.py (1)
`51-51`: Correct spelling change from `reduciable` to `reducible` enhances consistency and correctness.deepmd/pt/model/task/denoise.py (1)
`80-80`: Correct spelling change from `reduciable` to `reducible` enhances consistency and correctness. Also applies to: 87-87deepmd/pt/model/task/invar_fitting.py (1)
`151-151`: Correct spelling change from `reduciable` to `reducible` enhances consistency and correctness.deepmd/pt/model/task/dipole.py (2)
`69-69`: Corrected the spelling of "reducible" in the comments describing the properties of `r_differentiable` and `c_differentiable`. Also applies to: 72-72 --- `145-145`: Corrected the spelling of "reducible" in the `output_def` method. This change aligns with the stated PR objectives and ensures consistency across the codebase.source/tests/pt/model/test_linear_atomic_model_stat.py (1)
`55-55`: Corrected the spelling of "reducible" in the `output_def` method for both `FooFittingA` and `FooFittingB` classes. This change aligns with the stated PR objectives and ensures consistency across the codebase. Also applies to: 107-107source/tests/pt/model/test_dp_atomic_model.py (1)
`174-174`: Corrected the spelling of "reducible" in the `test_excl_consistency` method. This change aligns with the stated PR objectives and ensures consistency across the codebase.deepmd/dpmodel/fitting/dipole_fitting.py (2)
`79-79`: Corrected the spelling of "reducible" in the comments describing the properties of `r_differentiable` and `c_differentiable`. Also applies to: 82-82 --- `175-175`: Corrected the spelling of "reducible" in the `output_def` method. This change aligns with the stated PR objectives and ensures consistency across the codebase.deepmd/pt/model/task/ener.py (2)
`166-166`: Corrected typo in the `OutputVariableDef` for "energy". --- `173-173`: Corrected typo in the `OutputVariableDef` for "dforce".deepmd/dpmodel/fitting/invar_fitting.py (1)
`204-204`: Corrected typo in the `OutputVariableDef`.deepmd/pt/model/task/polarizability.py (1)
`219-219`: Corrected typo in the `OutputVariableDef` for "polarizability".deepmd/dpmodel/atomic_model/base_atomic_model.py (1)
`114-114`: Corrected typo in the `OutputVariableDef` for "mask".deepmd/dpmodel/fitting/polarizability_fitting.py (3)
Line range hint `75-117`: Constructor logic for unsupported configurations is correctly implemented. --- `218-218`: Spelling correction from `reduciable` to `reducible` is correctly applied. --- Line range hint `218-333`: The `call` method is well-structured and correctly implements the model computation logic.deepmd/dpmodel/atomic_model/pairtab_atomic_model.py (1)
`102-102`: Spelling correction from `reduciable` to `reducible` is correctly applied.source/tests/pt/model/test_atomic_model_atomic_stat.py (1)
Line range hint `1-400`: The test cases are comprehensive and correctly test the functionality of atomic models.deepmd/dpmodel/output_def.py (6)
`68-68`: Corrected spelling from `reduciable` to `reducible`. --- `169-169`: Corrected spelling from `reduciable` to `reducible` in the class `OutputVariableDef`. Also applies to: 195-195, 211-211 --- `410-410`: Corrected spelling from `reduciable` to `reducible` and made logical adjustments in the `do_reduce` function. Also applies to: 415-415 --- `432-432`: Corrected spelling from `reduciable` to `reducible` in the `do_mask` function. Also applies to: 442-442 --- `461-461`: Corrected spelling from `reduciable` to `reducible` and made logical adjustments in the `do_derivative` function. Also applies to: 473-473, 488-488, 498-498 --- `173-173`: Ensure consistency in the logical conditions related to `reducible` and `atomic`. Also applies to: 216-216source/tests/pt/model/test_atomic_model_global_stat.py (3)
`60-60`: Corrected typo in the attribute name enhances code readability and consistency. --- `67-67`: Typo correction aligns with the project's standards for attribute names. --- `74-74`: Spelling correction ensures consistency in attribute naming across the module.deepmd/pt/model/atomic_model/linear_atomic_model.py (1)
`296-296`: Corrected attribute name spelling improves consistency and readability.deepmd/pt/model/atomic_model/base_atomic_model.py (1)
`179-179`: Corrected the typo from 'reduciable' to 'reducible' in the `atomic_output_def` method.source/tests/common/dpmodel/test_output_def.py (1)
`43-43`: Corrected the typo from 'reduciable' to 'reducible' in various test definitions. Also applies to: 52-52, 61-61, 70-70, 78-78, 104-108, 163-167
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.74%. Comparing base (
e2b659a
) to head (9a9b941
). Report is 1 commits behind head on devel.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fix the spelling as suggested by https://github.com/deepmodeling/deepmd-kit/pull/3867#discussion_r1642260309.
Summary by CodeRabbit
Bug Fixes
reduciable
toreducible
across multiple files, enhancing the accuracy of parameter definitions and improving code consistency.Tests
reducible
parameter.These changes improve the clarity and correctness of the codebase, ensuring that attribute names are consistent and accurately reflect their intended functionality.