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

Python 3.12.x fixes #416

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Python 3.12.x fixes #416

merged 1 commit into from
Dec 4, 2024

Conversation

Syres916
Copy link
Contributor

@Syres916 Syres916 commented Dec 4, 2024

In order to mitigate errors such as:

00:55:58  /home/username/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalKfactor.py:66: SyntaxWarning: invalid escape sequence '\-'
  material_sheet_regex_str = "material_([a-zA-Z0-9_\-\[\]\.]+)"
00:55:58  /home/username/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalKfactor.py:155: SyntaxWarning: invalid escape sequence '\s'
  m = re.search("(K-[fF]actor)\s?\(?([a-zA-Z]*)\)?", content)

this PR also maintains backwards compatibility to Python 3.8.x and those in between.

@shaise shaise merged commit f584135 into shaise:master Dec 4, 2024
@shaise
Copy link
Owner

shaise commented Dec 4, 2024

Thanks!
What is the usage of the 'r' before the string?

@Syres916
Copy link
Contributor Author

Syres916 commented Dec 4, 2024

r = raw string is my understanding, see https://stackoverflow.com/questions/2081640/what-exactly-do-u-and-r-string-prefixes-do-and-what-are-raw-string-literals

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