Damn yaar!
I didn't know this. Astropy can be a dangerous place. There are codestyle ninjas present. Hidden in plain sight. It's not just the PEP8 speaks from GitHub actions. There are real people in it too. And worse of all they don't allow merging the Pull Request (PR) until we do what they say. All in the name of adhering to modern standards that improve readability. What has open source come to! Really?
This and the past week, below listed is what the codestyle ninjas have made me do to my otherwise perfectly working code: (copied without permission from GitHub)
- TABLE should not be used as a variable name
- No camelCase anywhere. For example, tableDescription should be table_description.
- Module level variables as SCREAMING_SNAKE_CASE. E.g. BYTE_BY_BYTE_TEMPLATE not ByteByByteTemplate.
- Regular variables, functions, methods are lower_case_underscore_separated, never camelCase or CapsCase.
- Private methods start with one underscore not two, e.g. def _split_float_format instead of def __splitFloatFormat.
- No inline blocks like, if sign: col.meta.size += 1
- Avoid one-line variable names, but especially l that looks like 1.
- List values alignment, dictionary values alignment, function definition line alignment, alignment this and alignment that and so on...
- And no white-spaces please, trailing or whatever!
Yeah! For some weird reason, the codestyle ninjas at Astropy seem to hate Camels and are extravagantly fond of Snakes! Dunno why? I for one reallyLikeCamelsAndTheirCase. Ha! Ha!
Disclaimer: The above post is in jest and should not be taken seriously. Sometimes Snakes are better than Camels. AND SCREAMING SNAKES ARE MORE BETTER. All hail PEP8!
Comments
Post a Comment