Skip to content

Conversation

@AndreMiras
Copy link
Member

Follow-up for #1126

key = key[1:]

match = re.search(r'[#\s]?([a-z_\.]+)', line)
key = match and match.group(1)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More accurate (handle spaces just after the # comment), yet more concise version.
Works on matching:

#config.option = foo

As well as:

# config.option = foo

Both would make key = "config.option"

@AndreMiras AndreMiras merged commit dccb7e8 into kivy:master May 30, 2020
@AndreMiras AndreMiras deleted the feature/test_numeric_version branch May 30, 2020 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants