mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
style: Apply ruff rule RUF039
RUF039 First argument to `re.compile()` is not raw string
This commit is contained in:
committed by
Adrien Vergé
parent
8513d9b97d
commit
e1182968d2
@@ -106,13 +106,13 @@ DEFAULT = {
|
||||
}
|
||||
|
||||
IS_NUMERAL_BEFORE_DECIMAL_PATTERN = (
|
||||
re.compile('[-+]?(\\.[0-9]+)([eE][-+]?[0-9]+)?$')
|
||||
re.compile(r'[-+]?(\.[0-9]+)([eE][-+]?[0-9]+)?$')
|
||||
)
|
||||
IS_SCIENTIFIC_NOTATION_PATTERN = re.compile(
|
||||
'[-+]?(\\.[0-9]+|[0-9]+(\\.[0-9]*)?)([eE][-+]?[0-9]+)$'
|
||||
r'[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)$'
|
||||
)
|
||||
IS_INF_PATTERN = re.compile('[-+]?(\\.inf|\\.Inf|\\.INF)$')
|
||||
IS_NAN_PATTERN = re.compile('(\\.nan|\\.NaN|\\.NAN)$')
|
||||
IS_INF_PATTERN = re.compile(r'[-+]?(\.inf|\.Inf|\.INF)$')
|
||||
IS_NAN_PATTERN = re.compile(r'(\.nan|\.NaN|\.NAN)$')
|
||||
|
||||
|
||||
def check(conf, token, prev, next, nextnext, context):
|
||||
|
Reference in New Issue
Block a user