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

f strings instead of string addition for compact readable code #297

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

shimwell
Copy link
Contributor

@shimwell shimwell commented Jun 2, 2024

Description

I've noticed the use of + to combine strings together in many places in the code so I wanted to make an example of how we can do this withf strings instead. In this case I think the f string version of code is a little nicer to read than the addition version. I've also made use of +=

Fixes # (issue)

nothing

Additional dependencies introduced.

None

Type of change

Please select what type of change this is.

  • refactoring for readability

Other changes

  • This change requires a documentation update
  • (If Benchmark) This requires additional data that can be obtained from:
    • Benchmark data 1
    • Benchamrk data 2

Testing

Sorry I've checked the output is the same locally but not added tests for this small change

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • General testing
    • New and existing unit tests pass locally with my changes
    • Coverage is >80%

@shimwell shimwell changed the title f strings instead of addition f strings instead of string addition for compact readable code Jun 2, 2024
@dodu94 dodu94 merged commit fe651d8 into JADE-V-V:master Jun 3, 2024
4 checks passed
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.

2 participants