Skip to content

Commit 26af9ff

Browse files
authored
Bug fix for Rect and Box init helpers (#2486)
* Add capital letters to accepted function regex * Add comment explaining in-depth why and where we need the feature
1 parent 54b2cee commit 26af9ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

util/update_quick_index.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,10 @@
391391

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

0 commit comments

Comments
 (0)