You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checkout'd and tried to run make package, and it broke because it detected CR in the sample code that I cloned. This puts unnecessary burden on the user just to test the code, because I'd have to know in the first place to clone it with non-default Git settings.
Instead, it should make copies without the carriage returns, and then build off of those.
I think the Python interpreter doesn't even care about CRs in source code.
Also, this code inefficiently reads every file, whether or not it cares about that file:
defscan_for_cr(path):
scanfiles= ('.py', '.sh')
forroot, _, filesinos.walk(path):
forflinfiles:
withopen(os.path.join(root, fl), 'rb') asf:
ifb'\r'inf.read() and [xforxinscanfilesiffl.endswith(x)]:
raiseException('Carriage return (\\r) found in file %s'% (os.path.join(root, fl)))
I checkout'd and tried to run
make package
, and it broke because it detected CR in the sample code that I cloned. This puts unnecessary burden on the user just to test the code, because I'd have to know in the first place to clone it with non-default Git settings.Instead, it should make copies without the carriage returns, and then build off of those.
I think the Python interpreter doesn't even care about CRs in source code.
Also, this code inefficiently reads every file, whether or not it cares about that file:
It should at least do the
scanfiles
check first.The text was updated successfully, but these errors were encountered: