Jun-06-2017, 03:46 PM
There's this guy in the office - in one of his commits he has added a dot to this line
In just 2 days the same person broke the load again - by creating circular import for the sake of .... annotation
Obviously, he did not test his code after either of those "cosmetic" changes
# This Python file uses the following encoding: utf-8This is the only thing he changed in the module - obviously, someone can actually mistake this line for a user-written comment , but since
utf-8.
is illegal encoding, the build was broken. So I was forced to add below this line the following warning################################################################## # IMPORTANT # The line above is not a comment - it should not be changed!!!!! ##################################################################and I also sent a mail to colleagues with the following warning
Quote:Dear all,
Lines like one below are not comments – they are encoding instructions. Load <No> was broken by adding dot to it – see <ticket>
# This Python file uses the following encoding: utf-8
This is the way encoding is defined when interpreter is not specified with a shebang line – which is not needed, when a module is not executable on its own.
See PEP-0263 for details
In just 2 days the same person broke the load again - by creating circular import for the sake of .... annotation
Obviously, he did not test his code after either of those "cosmetic" changes
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.