Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 50685:293e1763982e stable
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 17 Jun 2023 04:05:18 +0200 |
parents | 82cf392c99f6 |
children | a45460e235a2 |
comparison
equal
deleted
inserted
replaced
50684:82cf392c99f6 | 50685:293e1763982e |
---|---|
2209 except ImportError: | 2209 except ImportError: |
2210 _re2 = False | 2210 _re2 = False |
2211 | 2211 |
2212 | 2212 |
2213 class _re: | 2213 class _re: |
2214 def _checkre2(self): | 2214 @staticmethod |
2215 def _checkre2(): | |
2215 global _re2 | 2216 global _re2 |
2216 global _re2_input | 2217 global _re2_input |
2217 if _re2 is not None: | 2218 if _re2 is not None: |
2218 # we already have the answer | 2219 # we already have the answer |
2219 return | 2220 return |