Skip to content

Commit

Permalink
Fix invalid/unnecessary string escape sequences
Browse files Browse the repository at this point in the history
These invalid sequences are an issue because they result in SyntaxWarnings
in Python 3.12. The one in StartPage is the one we're most interested in,
as it appears quite prominently when opening FreeCAD.
  • Loading branch information
gkatev committed Jun 26, 2024
1 parent 0e9cf4a commit d1a3f3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Ext/freecad/fc_cadquery/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ParallelDirSelector(BaseDirSelector):
Linear Edges
Planar Faces
Use the string syntax shortcut \|(X|Y|Z) if you want to select
Use the string syntax shortcut |(X|Y|Z) if you want to select
based on a cardinal direction.
Example::
Expand Down Expand Up @@ -555,7 +555,7 @@ def _getVector(self,pr):
def filter(self,objectList):
"""
selects minimum, maximum, positive or negative values relative to a direction
[+\|-\|<\|>\|] \<X\|Y\|Z>
[+|-|<|>|] <X|Y|Z>
"""
return self.mySelector.filter(objectList)

Expand Down Expand Up @@ -618,7 +618,7 @@ class StringSyntaxSelector(Selector):
***Modifiers*** are ``('|','+','-','<','>','%')``
:\|:
:|:
parallel to ( same as :py:class:`ParallelDirSelector` ). Can return multiple objects.
:#:
perpendicular to (same as :py:class:`PerpendicularDirSelector` )
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Start/StartPage/StartPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def saveIcon(key,data,ext):
iconbank[key] = name
return name

_Re_Pattern = "<Property name=\"{}\".*?String value=\"(.*?)\"\/>"
_Re_Pattern = "<Property name=\"{}\".*?String value=\"(.*?)\"/>"
_Re_CreatedBy = re.compile(_Re_Pattern.format("CreatedBy"))
_Re_Company = re.compile(_Re_Pattern.format("Company"))
_Re_License = re.compile(_Re_Pattern.format("License"))
Expand Down

0 comments on commit d1a3f3b

Please sign in to comment.