Skip to content

Commit e118296

Browse files
DimitriPapadopoulosadrienverge
authored andcommitted
style: Apply ruff rule RUF039
RUF039 First argument to `re.compile()` is not raw string
1 parent 8513d9b commit e118296

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

yamllint/rules/float_values.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@
106106
}
107107

108108
IS_NUMERAL_BEFORE_DECIMAL_PATTERN = (
109-
re.compile('[-+]?(\\.[0-9]+)([eE][-+]?[0-9]+)?$')
109+
re.compile(r'[-+]?(\.[0-9]+)([eE][-+]?[0-9]+)?$')
110110
)
111111
IS_SCIENTIFIC_NOTATION_PATTERN = re.compile(
112-
'[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)$'
112+
r'[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)$'
113113
)
114-
IS_INF_PATTERN = re.compile('[-+]?(\\.inf|\\.Inf|\\.INF)$')
115-
IS_NAN_PATTERN = re.compile('(\\.nan|\\.NaN|\\.NAN)$')
114+
IS_INF_PATTERN = re.compile(r'[-+]?(\.inf|\.Inf|\.INF)$')
115+
IS_NAN_PATTERN = re.compile(r'(\.nan|\.NaN|\.NAN)$')
116116

117117

118118
def check(conf, token, prev, next, nextnext, context):

0 commit comments

Comments
 (0)