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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃懛 Replaces use of default mutable arguments in a function #155

Merged
merged 2 commits into from Aug 23, 2022
Merged

馃懛 Replaces use of default mutable arguments in a function #155

merged 2 commits into from Aug 23, 2022

Conversation

yezz123
Copy link
Contributor

@yezz123 yezz123 commented Jun 21, 2022

A little Improvement in Code, and refactor some common changes like:

  • Replaces the use of default mutable arguments in a function.
  • Converts a for loop into a list comprehension

Before:

            label_values = []
            for attribute_name in info_attribute_names:
                label_values.append(getattr(info, attribute_name))

After

            label_values = [
                getattr(info, attribute_name) for attribute_name in info_attribute_names
            ]

@codecov
Copy link

codecov bot commented Aug 23, 2022

Codecov Report

Merging #155 (2bfa052) into master (3f1c500) will decrease coverage by 0.31%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
- Coverage   93.48%   93.17%   -0.32%     
==========================================
  Files           4        4              
  Lines         261      249      -12     
==========================================
- Hits          244      232      -12     
  Misses         17       17              
Impacted Files Coverage 螖
...ometheus_fastapi_instrumentator/instrumentation.py 90.90% <100.00%> (-0.32%) 猬囷笍
src/prometheus_fastapi_instrumentator/metrics.py 97.29% <100.00%> (-0.23%) 猬囷笍
...rc/prometheus_fastapi_instrumentator/middleware.py 88.75% <100.00%> (酶)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@trallnag trallnag merged commit 623d83b into trallnag:master Aug 23, 2022
@trallnag
Copy link
Owner

Thanks

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.

None yet

2 participants