Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable TCH rule to move imports to TYPE_CHECKING #3602

Closed
wants to merge 3 commits into from

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Mar 25, 2024

No description provided.

@njzjz njzjz changed the title enable TCH rule enable TCH rule to move imports to TYPE_CHECKING Mar 25, 2024
deepmd/pt/utils/utils.py Fixed Show fixed Hide fixed
deepmd/pt/utils/utils.py Fixed Show fixed Hide fixed
Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.52%. Comparing base (d62a41f) to head (e150cc8).

Additional details and impacted files
@@             Coverage Diff             @@
##            devel    #3602       +/-   ##
===========================================
- Coverage   82.58%   63.52%   -19.07%     
===========================================
  Files         515      171      -344     
  Lines       48796    20150    -28646     
  Branches     2982     2968       -14     
===========================================
- Hits        40300    12800    -27500     
+ Misses       7585     6896      -689     
+ Partials      911      454      -457     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -179,19 +178,19 @@
def serialize(self) -> dict:
raise NotImplementedError

def deserialize(cls) -> "EnergyFittingNetDirect":
def deserialize(cls) -> EnergyFittingNetDirect:

Check notice

Code scanning / CodeQL

First parameter of a method is not named 'self' Note

Normal methods should have 'self', rather than 'cls', as their first parameter.
atomic: Literal[False] = False,
) -> Tuple[np.ndarray, np.ndarray, np.ndarray]: ...
) -> tuple[np.ndarray, np.ndarray, np.ndarray]: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
*,
atomic: Literal[True],
) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: ...
) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
@njzjz
Copy link
Member Author

njzjz commented May 17, 2024

This PR is not compatible with PyTorch. Closing.

@njzjz njzjz closed this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant