Skip to content

Commit ca6cba5

Browse files
committed
Use better code-block types
1 parent ee5fb4b commit ca6cba5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/types.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ While having a nice syntax for type metadata is great, it's even greater that `m
3636
Imagine you add another line that tries to instantiate the defined class using ``SomeClass("23")``.
3737
Mypy will catch that error for you:
3838

39-
.. code-block:: bash
39+
.. code-block:: console
4040
4141
$ mypy t.py
4242
t.py:12: error: Argument 1 to "SomeClass" has incompatible type "str"; expected "int"
4343
4444
This happens *without* running your code!
4545

4646
And it also works with *both* Python 2-style annotation styles.
47-
To mypy, this code is equivalent to the one above::
47+
To mypy, this code is equivalent to the one above:
48+
49+
.. code-block:: python
4850
4951
@attr.s
5052
class SomeClass(object):

0 commit comments

Comments
 (0)