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

Removing mutable data structures and function calls as default arguments in the entire codebase #4834

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

tanishy7777
Copy link
Contributor

@tanishy7777 tanishy7777 commented Dec 13, 2024

Fixes #4655

Changes made in this Pull Request:

  • Removing mutable data structures and function calls as default arguments in the entire codebase and initializing/calling them inside the function instead
  • There were 12 issues found using the ruff module(select = B006, B008 and ignore=E501) which were all fixed

PR Checklist

  • Tests
  • CHANGELOG updated?
  • Issue raised/referenced

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4834.org.readthedocs.build/en/4834/

@RMeli RMeli changed the title Fixes issue#4655 removing mutable data structures and function calls as default arguments in the entire codebase Removing mutable data structures and function calls as default arguments in the entire codebase Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 93.63%. Comparing base (f4e0f0b) to head (f6f7a4b).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
package/MDAnalysis/analysis/encore/similarity.py 75.00% 0 Missing and 3 partials ⚠️
package/MDAnalysis/analysis/base.py 0.00% 1 Missing and 1 partial ⚠️
package/MDAnalysis/topology/ITPParser.py 33.33% 1 Missing and 1 partial ⚠️
package/MDAnalysis/analysis/align.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4834      +/-   ##
===========================================
- Coverage    93.68%   93.63%   -0.06%     
===========================================
  Files          177      189      +12     
  Lines        21743    22829    +1086     
  Branches      3055     3065      +10     
===========================================
+ Hits         20370    21375    +1005     
- Misses         927     1002      +75     
- Partials       446      452       +6     

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

Copy link
Member

@RMeli RMeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tanishy7777, LGTM!

@RMeli RMeli self-assigned this Dec 13, 2024
@RMeli
Copy link
Member

RMeli commented Dec 13, 2024

Can you please fix the conflict on the CHANGELOG?

@tanishy7777
Copy link
Contributor Author

Can you please fix the conflict on the CHANGELOG?

Yes, I have fixed it

@RMeli RMeli merged commit 0eddf3b into MDAnalysis:develop Dec 13, 2024
21 of 24 checks passed
@RMeli
Copy link
Member

RMeli commented Dec 13, 2024

Thanks @tanishy7777, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MAINT: a few mutable default arguments are back
2 participants