From eabb14cc07a1ba4f64dc735bbdb51cd640a2a0c7 Mon Sep 17 00:00:00 2001 From: Qubitium Date: Mon, 13 Apr 2026 07:06:13 +0000 Subject: [PATCH] ruff --- pcre/pcre.py | 4 +++- setup.py | 2 +- tests/test_clobber_thread.py | 1 + tests/test_core.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pcre/pcre.py b/pcre/pcre.py index 84b4880..3f4b6a7 100644 --- a/pcre/pcre.py +++ b/pcre/pcre.py @@ -18,6 +18,7 @@ from .cache import clear_cache as _clear_cache from .flags import Flag, strip_py_only_flags + # Cache frequently used flag values as plain integers to avoid the overhead of # IntFlag arithmetic in hot paths such as module-level search helpers. COMPAT_UNICODE_ESCAPE: int = int(Flag.COMPAT_UNICODE_ESCAPE) @@ -29,11 +30,12 @@ NO_UCP: int = int(Flag.NO_UCP) from .re_compat import ( Match as _CompatMatch, +) +from .re_compat import ( TemplatePatternStub, coerce_group_value, coerce_subject_slice, compute_next_pos, - count_capturing_groups, is_bytes_like, join_parts, maybe_infer_group_count, diff --git a/setup.py b/setup.py index 278ef3a..01884a7 100644 --- a/setup.py +++ b/setup.py @@ -26,9 +26,9 @@ compiler_supports_flags, discover_include_dirs, discover_library_dirs, + ensure_python_headers, extend_env_paths, extend_unique, - ensure_python_headers, filter_incompatible_multiarch, find_library_with_brew, find_library_with_ldconfig, diff --git a/tests/test_clobber_thread.py b/tests/test_clobber_thread.py index 1b8e534..8019361 100644 --- a/tests/test_clobber_thread.py +++ b/tests/test_clobber_thread.py @@ -17,6 +17,7 @@ import pcre import pytest + from tests import test_clobber as fuzz_core diff --git a/tests/test_core.py b/tests/test_core.py index 55f5bf4..47a733e 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,6 +1,6 @@ +import re import types from collections import OrderedDict -import re import pytest from pcre import Flag