Skip to content

Commit

Permalink
style: Apply ruff rule RUF039
Browse files Browse the repository at this point in the history
RUF039 First argument to `re.compile()` is not raw string
  • Loading branch information
DimitriPapadopoulos authored and adrienverge committed Dec 18, 2024
1 parent 8513d9b commit e118296
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yamllint/rules/float_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@
}

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):
Expand Down

0 comments on commit e118296

Please sign in to comment.