Merge pull request #4240 from wisp3rwind/pr_contrib_py3

CONTRIBUTING.rst: minor Python 3 adaptation
This commit is contained in:
Adrian Sampson 2022-01-20 15:12:52 -05:00 committed by GitHub
commit 4905e0f5f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -203,11 +203,10 @@ There are a few coding conventions we use in beets:
instead. In particular, we have our own logging shim, so youll see
``from beets import logging`` in most files.
- Always log Unicode strings (e.g., ``log.debug(u"hello world")``).
- The loggers use
`str.format <http://docs.python.org/library/stdtypes.html#str.format>`__-style
logging instead of ``%``-style, so you can type
``log.debug(u"{0}", obj)`` to do your formatting.
``log.debug("{0}", obj)`` to do your formatting.
- Exception handlers must use ``except A as B:`` instead of
``except A, B:``.