File tree 2 files changed +6
-74
lines changed
2 files changed +6
-74
lines changed Original file line number Diff line number Diff line change @@ -569,8 +569,7 @@ do not make sudden changes to the code that could have the potential to break
569
569
a lot of user code as a result, that is, we need it to be as *backwards compatible *
570
570
as possible to avoid mass breakages.
571
571
572
- Additional standards are outlined on the (Placeholder as a reminder to ask the
573
- devs for the help on how to properly link the new created file)
572
+ Additional standards are outlined on the `pandas code style guide <contributing_code_guide >`_
574
573
575
574
Optional dependencies
576
575
---------------------
Original file line number Diff line number Diff line change 1
- .. _ Not_sure_what_to_put_here :
1
+ .. _ contributing_code_guide :
2
2
3
3
{{ header }}
4
4
@@ -121,79 +121,12 @@ For example:
121
121
122
122
.. code-block :: python
123
123
124
- raise ValueError (f " Unknown recived value, got: { repr (value)} " )
124
+ value = str
125
+ f " Unknown recived value, got: { repr (value)} "
125
126
126
127
**Good: **
127
128
128
129
.. code-block :: python
129
130
130
- raise ValueError (f " Unknown recived type, got: ' { type (value).__name__ } ' " )
131
-
132
- **Bad: **
133
-
134
- .. code-block :: python
135
-
136
- raise ValueError (f " Unknown recived type, got: { repr (type (value).__name__ )} " )
137
-
138
- Single and double quotes
139
- ------------------------
140
-
141
- *pandas * uses single quotes when ....
142
-
143
- For example:
144
-
145
- **Good: **
146
-
147
- .. code-block :: python
148
-
149
- placeholder = True
150
-
151
-
152
- **Bad: **
153
-
154
- .. code-block :: python
155
-
156
- placeholder = True
157
-
158
- And using double quotes when....
159
-
160
- For example:
161
-
162
- **Good: **
163
-
164
- .. code-block :: python
165
-
166
- placeholder = True
167
-
168
-
169
- **Bad: **
170
-
171
- .. code-block :: python
172
-
173
- placeholder = True
174
-
175
- Typing
176
- ======
177
-
178
- Annotating __init__
179
- -------------------
180
-
181
- *pandas * does not annotate the '__init__' function. it is redundant
182
- as almost every '__init__' function will most like not to return anything.
183
-
184
- For example:
185
-
186
- **Good: **
187
-
188
- .. code-block :: python
189
-
190
- def __init__ (self , name ):
191
- self .name = name
192
-
193
- **Bad: **
194
-
195
- .. code-block :: python
196
-
197
- def __init__ (self , name ) -> None :
198
- self .name = name
199
-
131
+ value = str
132
+ f " Unknown recived type, got: ' { type (value).__name__ } ' "
You can’t perform that action at this time.
0 commit comments