Skip to content

Commit 8a79916

Browse files
author
MomIsBestFriend
committed
Lint issues
1 parent e01085e commit 8a79916

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

doc/source/development/contributing_code_guide.rst

+12-4
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,33 @@ For example:
2424

2525
.. code-block:: python
2626
27-
cls = type(self)
27+
class MyClass:
28+
def __init__(self):
29+
cls = type(self)
2830
2931
**Good:**
3032

3133
.. code-block:: python
3234
33-
name = type(self).__name__
35+
class MyClass:
36+
def __init__(self):
37+
name = type(self).__name__
3438
3539
**Bad:**
3640

3741
.. code-block:: python
3842
39-
cls = self.__class__
43+
class MyClass:
44+
def __init__(self):
45+
cls = self.__class__
4046
4147
**Bad:**
4248

4349
.. code-block:: python
4450
45-
name = self.__class__.__name__
51+
class MyClass:
52+
def __init__(self):
53+
name = self.__class__.__name__
4654
4755
String formatting
4856
=================

0 commit comments

Comments
 (0)