Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map.parse() is too complex #6

Open
tomato42 opened this issue Mar 27, 2018 · 0 comments
Open

Map.parse() is too complex #6

tomato42 opened this issue Mar 27, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@tomato42
Copy link

https://github.com/ansasaki/symbol_version/blob/f441d3446bcb325df9a3ae440313d30da2646952/scripts/symbol_version.py#L226-L395

in general, I wonder if first splitting the file into sections for specific versions, and then parsing them wouldn't result in cleaner code

245: combination of strip() and startswith() seems like less heavy-handed approach (and more readable)

In general, I think a lot of the regex calls could be replaced by find(), startswith() or split()

246: comparison to None, in general it should be is not None, in this case it should be just if m:

@ansasaki ansasaki added the enhancement New feature or request label Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants