-
Notifications
You must be signed in to change notification settings - Fork 81
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
Update _m3gnet.py for correct output type #643
Update _m3gnet.py for correct output type #643
Conversation
Signed-off-by: Zishen Wang <[email protected]>
Signed-off-by: Zishen Wang <[email protected]>
WalkthroughThe primary change involves modifying a conditional check in the Changes
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
if self.return_type is dict: | ||
return atom_fea_dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the type comparison logic.
The change from isinstance(self.return_type, dict)
to self.return_type is dict
is incorrect. The is
operator checks for identity, not type. Use isinstance
to correctly check the type.
- if self.return_type is dict:
+ if isinstance(self.return_type, dict):
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if self.return_type is dict: | |
return atom_fea_dict | |
if isinstance(self.return_type, dict): | |
return atom_fea_dict |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #643 +/- ##
==========================================
- Coverage 67.45% 67.39% -0.06%
==========================================
Files 68 68
Lines 5276 5276
==========================================
- Hits 3559 3556 -3
- Misses 1717 1720 +3 ☔ View full report in Codecov by Sentry. |
Commit and PR descriptions have to clearly say what it is. Saying minor bug fix does not give any information. |
Summary
Major changes:
Todos
If this is work in progress, what else needs to be done?
Checklist
ruff
.mypy
.duecredit
@due.dcite
decorators to reference relevant papers by DOI (example)Tip: Install
pre-commit
hooks to auto-check types and linting before every commit: