-
Notifications
You must be signed in to change notification settings - Fork 29
Fix: f-string backslash and unterminated string literal errors remedi… #32
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: f-string backslash and unterminated string literal errors remedi… #32
Conversation
|
Hi, @ilLuSion-007 The errors are indeed related to the use of certain f-string features (I cannot reproduce them in recent versions of Python). Can you please tell me your exact version of Python?. I need to start looking for tools in Python that tell me whether certain code is compatible with certain versions of Python or not; in the past I used vermin but it doesn't support several Python 3.12 checks, for example. Thanks. |
|
Hi, @ilLuSion-007 Well, it seems a have a solution to check for actual errors in Python 3.11 (the minimum required version for my tool):
Let me please use use this method first to identify all possible errors with different options!. Thanks.! |
|
I finally used your suggestions, but not exactly in the same way, to correct these errors at f70c7ea. And I mentioned you in the acknowledgments section. Thanks for your time!. |
Sorry for the delayed response. Could you please confirm your exact Python version? For ensuring code compatibility, I recommend these pylint to catch version-specific syntax and API issues. It is good one and I have pylint shell checks in my production workloads too. Also, if you want to future-proof your workflow and greatly speed up dependency management, I highly suggest checking out the uv project by Astral. It's positioned as a faster, next-gen alternative to pip, and it’s worth migrating to for improved performance and long-term compatibility with modern Python tooling. |
Absolutely, if that works for you, I still highly recommend using Pylint. You can find more information about it at www.pylint.org or check out its official documentation. Pylint is a widely-used static code analyzer for Python that excels at catching syntax errors, enforcing PEP 8 style guidelines, and identifying coding issues before runtime. |
You're welcome :) |
Description
repr(ck)when joining during print to ensure proper escaping and literal representation.repr(m)when joiningmatch_methodentries to ensure proper escaping and literal representation.print_detail_sandget_detailcalls intoval1/val2before formatting for single evaluation.Fixes # (issue)
Issue Encountered During Execution :
SyntaxError: unterminated string literal (detected at line 459)
SyntaxError: f-string expression part cannot include a backslash
Images :
Type of change
How Has This Been Tested?
Checklist: