Skip to content

Commit

Permalink
Fix cmd5.py SyntaxWarning: invalid escape sequence
Browse files Browse the repository at this point in the history
fixes

	$ python ./scripts/cmd5.py
	/Users/chillerdragon/Desktop/git/teeworlds/./scripts/cmd5.py:11: SyntaxWarning: invalid escape sequence '\/'
	  d = re.sub("\/\*.*?\*/".encode(), "".encode(), d) # remove /* */ comments
	#define GAME_NETVERSION_HASH "e9800998ecf8427e"
  • Loading branch information
ChillerDragon committed Mar 9, 2024
1 parent 42878d0 commit a9b7f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/cmd5.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def cstrip(lines):
l = re.sub("#.*".encode(), "".encode(), l)
l = re.sub("//.*".encode(), "".encode(), l)
d += l + " ".encode()
d = re.sub("\/\*.*?\*/".encode(), "".encode(), d) # remove /* */ comments
d = re.sub(r"\/\*.*?\*/".encode(), "".encode(), d) # remove /* */ comments
d = d.replace("\t".encode(), " ".encode()) # tab to space
d = re.sub(" *".encode(), " ".encode(), d) # remove double spaces
d = re.sub("".encode(), "".encode(), d) # remove /* */ comments
Expand Down

0 comments on commit a9b7f8a

Please sign in to comment.