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

Doesn't catch Python 3.12 f-strings changes #264

Open
me21 opened this issue May 30, 2024 · 0 comments
Open

Doesn't catch Python 3.12 f-strings changes #264

me21 opened this issue May 30, 2024 · 0 comments

Comments

@me21
Copy link

me21 commented May 30, 2024

Describe the bug
Vermin doesn't catch changes introduced in Python 3.12 to f-strings. Specifically, f-string nesting. See https://docs.python.org/3/whatsnew/3.12.html#pep-701-syntactic-formalization-of-f-strings

To Reproduce
I had the following line in my source:
Paragraph(f'{split_fio_birthdate(visitor['fio'])[0]}', normal_style), (please note single quotes inside f-string as well as enclosing ones).

When I invoked vermin with vermin -v --exclude-regex venv ., it incorrectly marked the file containing that line as !2, 3.9. The actual run attempt on Python 3.11.2 threw the following error: SyntaxError: f-string: unmatched '['.

Expected behavior
The file should be marked as !2, 3.12.

Environment (please complete the following information):

  • vermin 1.6.0
  • Python 3.12 on the machine I run vermin on (I think with Python 3.11 that line might trigger syntax error)
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

1 participant