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

use strings as immutable default arguments #162

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

benjdevries
Copy link

Fixes #161

Avoid using mutable objects as default arguments as functions. Even though this particular usage was safe, it opens up the projects to issues down the road if the default argument is mutated within the function. For this usage, we don't need an actual list object, just a sequence of strings, so we can use a string itself.

@benjdevries
Copy link
Author

I'm a first time contributor. Please let me know if I should update the PR title or description or if there is any documentation that needs to be updated as well. Thanks!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.19%. Comparing base (e927322) to head (b3e3e5a).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #162   +/-   ##
========================================
  Coverage    97.19%   97.19%           
========================================
  Files            8        8           
  Lines          214      214           
  Branches        46       46           
========================================
  Hits           208      208           
  Misses           3        3           
  Partials         3        3           

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

@kislyuk kislyuk merged commit b87baea into pyauth:develop Mar 26, 2024
7 checks passed
@kislyuk
Copy link
Member

kislyuk commented Mar 26, 2024

Thanks for contributing! I will check the docs/linting and make a new release soon.

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.

Don't use mutable objects as default arguments
3 participants