Skip to content

Commit 6cb5e8e

Browse files
committed
drop Python2.7 WIP, trim usage of "six"
1 parent 03e3cc0 commit 6cb5e8e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

python/jsbeautifier/core/inputscanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def readUntilAfter(self, pattern):
119119
def get_regexp(self, pattern, match_from=False):
120120
result = None
121121
# strings are converted to regexp
122-
if isinstance(pattern, self.__six.string_types) and pattern != "":
122+
if isinstance(pattern, str) and pattern != "":
123123
result = re.compile(pattern)
124124
elif pattern is not None:
125125
result = re.compile(pattern.pattern)

python/jsbeautifier/javascript/acorn.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,34 +46,34 @@
4646
_unicodeEscapeOrCodePoint = six.u(r"\\u[0-9a-fA-F]{4}|\\u\{[0-9a-fA-F]+\}")
4747

4848
_identifierStart = (
49-
six.u("(?:")
49+
"(?:"
5050
+ _unicodeEscapeOrCodePoint
51-
+ six.u("|[")
51+
+ "|["
5252
+ _baseASCIIidentifierStartChars
5353
+ _nonASCIIidentifierStartChars
54-
+ six.u("])")
54+
+ "])"
5555
)
5656
_identifierChars = (
57-
six.u("(?:")
57+
"(?:"
5858
+ _unicodeEscapeOrCodePoint
59-
+ six.u("|[")
59+
+ "|["
6060
+ _baseASCIIidentifierChars
6161
+ _nonASCIIidentifierStartChars
6262
+ _nonASCIIidentifierChars
63-
+ six.u("])*")
63+
+ "])*"
6464
)
6565

6666
identifier = re.compile(_identifierStart + _identifierChars)
6767

6868
identifierStart = re.compile(_identifierStart)
6969
identifierMatch = re.compile(
70-
six.u("(?:")
70+
"(?:"
7171
+ _unicodeEscapeOrCodePoint
72-
+ six.u("|[")
72+
+ "|["
7373
+ _baseASCIIidentifierChars
7474
+ _nonASCIIidentifierStartChars
7575
+ _nonASCIIidentifierChars
76-
+ six.u("])+")
76+
+ "])+"
7777
)
7878

7979
_nonASCIIwhitespace = re.compile(

0 commit comments

Comments
 (0)