pylint-bot / test

0 stars 0 forks source link

Consistent names for certain common variables and conform to PEP8. #245

Open pylint-bot opened 8 years ago

pylint-bot commented 8 years ago

Originally reported by: BitBucket: ceridwenv, GitHub: @ceridwen?


For example, astroid contains a wide variety of different misspellings for "class." The preferred misspelling, according to PEP8, is "cls." For other keywords/builtin names, it suggests appending a trailing underscore. I've started using in these the new code I'm writing, but it would be nice to be consistent throughout. Another example is how the code variously uses "e," "ex," "exc," and probably some others for the name in the as part of an except clause. I'd prefer to use "error," but we should establish a consistent spelling for common variable names like this.


pylint-bot commented 8 years ago

Original comment by Sylvain Thénault (BitBucket: sthenault, GitHub: @sthenault?):


Regarding exceptions my preference goes to exc and it's probable already spawned over the code so it may ne a pragmatic choice :)