Skip to content

Commit

Permalink
Fix regex flags usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Jun 24, 2022
1 parent 53e6add commit 2760a38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qiskit/qpy/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"""
+ "$"
)
VERSION_PATTERN_REGEX = re.compile(VERSION_PATTERN)
VERSION_PATTERN_REGEX = re.compile(VERSION_PATTERN, re.VERBOSE | re.IGNORECASE)


@deprecate_arguments({"circuits": "programs"})
Expand Down Expand Up @@ -150,7 +150,7 @@ def dump(
else:
raise TypeError(f"'{program_type}' is not supported data type.")

version_match = VERSION_PATTERN_REGEX.search(__version__, re.VERBOSE | re.IGNORECASE)
version_match = VERSION_PATTERN_REGEX.search(__version__)
version_parts = [int(x) for x in version_match.group("release").split(".")]
header = struct.pack(
formats.FILE_HEADER_PACK,
Expand Down Expand Up @@ -227,7 +227,7 @@ def load(
)
if data.preface.decode(common.ENCODE) != "QISKIT":
raise QiskitError("Input file is not a valid QPY file")
version_match = VERSION_PATTERN_REGEX.search(__version__, re.VERBOSE | re.IGNORECASE)
version_match = VERSION_PATTERN_REGEX.search(__version__)
version_parts = [int(x) for x in version_match.group("release").split(".")]

header_version_parts = [data.major_version, data.minor_version, data.patch_version]
Expand Down

0 comments on commit 2760a38

Please sign in to comment.