re: make _checkre2 a static method stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 17 Jun 2023 04:05:18 +0200
branchstable
changeset 50397 293e1763982e
parent 50396 82cf392c99f6
child 50398 a45460e235a2
re: make _checkre2 a static method There is no need to it to be a method, so we make it at least a static method to make it easier to call.
mercurial/util.py
--- a/mercurial/util.py	Sat Jun 17 04:02:25 2023 +0200
+++ b/mercurial/util.py	Sat Jun 17 04:05:18 2023 +0200
@@ -2211,7 +2211,8 @@
 
 
 class _re:
-    def _checkre2(self):
+    @staticmethod
+    def _checkre2():
         global _re2
         global _re2_input
         if _re2 is not None: