Skip to content

Commit

Permalink
last one -- hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvm committed Jan 17, 2015
1 parent ab85ad0 commit 4a2ada0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions blocks/bricks/sequence_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def take_look(self, **kwargs):
pass


@add_metaclass(ABCMeta)
class Readout(AbstractReadout):
"""Readout brick with separated emitting and feedback parts.
Expand Down
10 changes: 9 additions & 1 deletion docs/developer_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,18 @@ Python 2 and 3
Blocks aims to be both Python 2 and Python 3 compliant using a single code-base,
without using 2to3_. There are many online resources which discuss the writing
compatible code. For a quick overview see `the cheatsheet from Python
Charmers`_. For non-trivial cases, we use the six_ compatibility library.
Charmers`_. For non-trivial cases, we use the six_ compatibility library. Some
quirks that this brings:

* Our documentation generation framework, Sphinx_ (using autodoc_), will try to
initialize abstract classes if they inherit the ``ABCMeta`` class from a
parent. To make sure that the documentation builds successfully make sure to
use the ``@add_metaclass`` decorator on all abstract classes.

Documentation should be written to be Python 3 compliant.

.. _2to3: https://docs.python.org/2/library/2to3.html
.. _the cheatsheet from Python Charmers: http://python-future.org/compatible_idioms.html
.. _six: https://pythonhosted.org/six/
.. _Sphinx: http://sphinx-doc.org/
.. _autodoc: http://sphinx-doc.org/ext/autodoc.html

0 comments on commit 4a2ada0

Please sign in to comment.