Skip to content

Conversation

@ilLuSion-007
Copy link

@ilLuSion-007 ilLuSion-007 commented Jul 29, 2025

Description

  • Switch to repr(ck) when joining during print to ensure proper escaping and literal representation.
  • Use repr(m) when joining match_method entries to ensure proper escaping and literal representation.
  • Extract print_detail_s and get_detail calls into val1/val2 before 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 :

image image

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Tested the execution

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have checked my code and corrected any misspellings

@rfc-st
Copy link
Owner

rfc-st commented Jul 30, 2025

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.

@rfc-st rfc-st self-assigned this Jul 30, 2025
@rfc-st rfc-st added the bug Something isn't working label Jul 30, 2025
@rfc-st
Copy link
Owner

rfc-st commented Jul 30, 2025

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):

┌──(bluesman㉿kali)-[~]
└─$ docker run --rm -v /home/bluesman/humble_venv/humble:/code -w /code python:3.11 python humble.py -b
File "humble.py", line 459
print(f"{print_detail_s('[enabled_cnt_w]',
^
SyntaxError: unterminated string literal (detected at line 459)

Let me please use use this method first to identify all possible errors with different options!.

Thanks.!

rfc-st added a commit that referenced this pull request Jul 30, 2025
@rfc-st
Copy link
Owner

rfc-st commented Jul 30, 2025

Hi @ilLuSion-007

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!.

@rfc-st rfc-st closed this Jul 30, 2025
@ilLuSion-007
Copy link
Author

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.

Sorry for the delayed response.

Could you please confirm your exact Python version?
Python 3.11.6.

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.

@ilLuSion-007
Copy link
Author

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):

┌──(bluesman㉿kali)-[~] └─$ docker run --rm -v /home/bluesman/humble_venv/humble:/code -w /code python:3.11 python humble.py -b File "humble.py", line 459 print(f"{print_detail_s('[enabled_cnt_w]', ^ SyntaxError: unterminated string literal (detected at line 459)

Let me please use use this method first to identify all possible errors with different options!.

Thanks.!

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.

@ilLuSion-007
Copy link
Author

Hi @ilLuSion-007

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!.

You're welcome :)

@rfc-st rfc-st added the solved label Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working solved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants