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

Add linter to enforce usage of f-strings #1281

Merged
merged 12 commits into from
Sep 29, 2021

Conversation

namurphy
Copy link
Member

This PR:

  • Adds the flake8-use-fstring linter to tox.ini
  • Removes the last of our .format and % s usage with f-strings.

@github-actions github-actions bot added plasmapy.formulary Related to the plasmapy.formulary subpackage plasmapy.particles Related to the plasmapy.particles subpackage plasmapy.utils Related to the plasmapy.utils subpackage labels Sep 28, 2021
@namurphy namurphy added CI Related to continuous integration status: ready for review PRs that are ready for code review testing labels Sep 28, 2021
@codecov
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #1281 (54306fe) into main (9eb845c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1281   +/-   ##
=======================================
  Coverage   97.06%   97.07%           
=======================================
  Files          73       73           
  Lines        7093     7111   +18     
=======================================
+ Hits         6885     6903   +18     
  Misses        208      208           
Impacted Files Coverage Δ
plasmapy/formulary/radiation.py 100.00% <ø> (ø)
plasmapy/utils/datatype_factory_base.py 100.00% <ø> (ø)
plasmapy/formulary/magnetostatics.py 100.00% <100.00%> (ø)
plasmapy/formulary/parameters.py 99.11% <100.00%> (ø)
plasmapy/particles/ionization_state.py 94.18% <100.00%> (-0.12%) ⬇️
plasmapy/particles/ionization_state_collection.py 91.10% <100.00%> (ø)
plasmapy/utils/roman.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9eb845c...54306fe. Read the comment docs.

@namurphy
Copy link
Member Author

I discovered I can use procrastination driven development to procrastinate on other procrastination driven development! 🙀 😹

@namurphy namurphy requested a review from a team September 29, 2021 00:17
@namurphy namurphy merged commit 9fd137c into PlasmaPy:main Sep 29, 2021
@namurphy namurphy deleted the static-analysis-1 branch September 29, 2021 15:43
Tlord18 pushed a commit to Tlord18/PlasmaPy that referenced this pull request Oct 6, 2021
* Enforce f-string usage in linters

* Use f-strings in magnetostatics.py

* Use f-strings in roman.py

* Use f-strings in ionization_state_collection.py

* Use f-strings in datatype_factory_base.py

* Fix issue with f-string conversion

* Add changelog entries

* Finish changelog entry

* Update configuration for flake8-use-fstrings

* Fix usage of f-strings

* Fix link formatting
Tlord18 pushed a commit to Tlord18/PlasmaPy that referenced this pull request Oct 6, 2021
* Enforce f-string usage in linters

* Use f-strings in magnetostatics.py

* Use f-strings in roman.py

* Use f-strings in ionization_state_collection.py

* Use f-strings in datatype_factory_base.py

* Fix issue with f-string conversion

* Add changelog entries

* Finish changelog entry

* Update configuration for flake8-use-fstrings

* Fix usage of f-strings

* Fix link formatting
@namurphy namurphy removed the status: ready for review PRs that are ready for code review label Aug 15, 2022
@namurphy namurphy added the linters Code linters and autoformatters label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Related to continuous integration linters Code linters and autoformatters plasmapy.formulary Related to the plasmapy.formulary subpackage plasmapy.particles Related to the plasmapy.particles subpackage plasmapy.utils Related to the plasmapy.utils subpackage testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants