Skip to content

Address Style Guide Infractions

This MR addresses much of #241 (closed). Each commit handles a different aspect of the style guide. 2a2338b4 contains a bug fix, but all other commits are style-only. Lacking from this MR are changes that would alter behavior and/or break backward-compatibility:

  1. Replace bare except clauses with except: Exception or narrower, so as to not unintentionally catch all exceptions (e.g. SystemExit and KeyboardInterrupt).
  2. Change type comparisons to use isinstance() instead of comparing types directly.
  3. Rename module-level constants to be UPPERCASE_WITH_UNDERSCORES.
  4. Rename functions, methods, and their parameters to be lower_case_with_underscores.
  5. Rename classes to be CapWords.

Please let me know how you'd like these remaining changes merged (e.g. individual commits in a single new MR, individual MRs, individual commits in this MR, etc.). One could argue that the first two bullets, especially number one, are bug fixes.

Merge request reports