Skip to content

Commit

Permalink
Bug fix for Rect and Box init helpers (#2486)
Browse files Browse the repository at this point in the history
* Add capital letters to accepted function regex

* Add comment explaining in-depth why and where we need the feature
  • Loading branch information
pushfoo authored Jan 9, 2025
1 parent 54b2cee commit 26af9ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/update_quick_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,10 @@

# Patterns + default config dict
CLASS_RE = re.compile(r"^class ([A-Za-z0-9]+[^\(:]*)")
FUNCTION_RE = re.compile("^def ([a-z][a-z0-9_]*)")
# Yes, the capital letters in this pattern are intentional. They
# capture type instantiation helpers which act like type init calls
# in the rect, box, and other modules.
FUNCTION_RE = re.compile("^def ([a-zA-Z][a-zA-Z0-9_]*)")
TYPE_RE = re.compile("^(?!LOG =)([A-Za-z][A-Za-z0-9_]*) =")
DEFAULT_EXPRESSIONS = {
'class': CLASS_RE,
Expand Down

0 comments on commit 26af9ff

Please sign in to comment.