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

Fix Syntax Error with Nested Single Quotes in f-string #207

Open
sourcery-ai bot opened this issue Sep 12, 2024 · 0 comments
Open

Fix Syntax Error with Nested Single Quotes in f-string #207

sourcery-ai bot opened this issue Sep 12, 2024 · 0 comments

Comments

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 12, 2024

There is a potential syntax error when using single quotes inside an f-string that is also enclosed in single quotes. This can lead to syntax errors in the code.

Problem:
Using single quotes for both the outer f-string and the inner string can cause a conflict, resulting in a syntax error.

Suggested Fix:
To resolve this issue, use double quotes for the outer f-string. For example, change:

ylabel=f'MSE [{units['mse']}]',

To:

ylabel=f"MSE [{units['mse']}]",

This change avoids the conflict with the single quotes inside the f-string and should resolve the syntax error.

Action Items:

  • Review the codebase for similar instances of nested single quotes in f-strings.
  • Apply the suggested fix where applicable to prevent syntax errors.

I created this issue for @ruancomelli from #204 (comment).

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

No branches or pull requests

0 participants