File tree Expand file tree Collapse file tree 2 files changed +8
-68
lines changed Expand file tree Collapse file tree 2 files changed +8
-68
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
569569a lot of user code as a result, that is, we need it to be as *backwards compatible *
570570as possible to avoid mass breakages.
571571
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 >`_
574573
575574Optional dependencies
576575---------------------
Original file line number Diff line number Diff line change 1- .. _ Not_sure_what_to_put_here :
1+ .. _ contributing_code_guide :
22
33{{ header }}
44
@@ -121,79 +121,20 @@ For example:
121121
122122.. code-block :: python
123123
124- raise ValueError (f " Unknown recived value, got: { repr (value)} " )
124+ value = str
125+ f " Unknown recived value, got: { repr (value)} "
125126
126127 **Good: **
127128
128129.. code-block :: python
129130
130- raise ValueError (f " Unknown recived type, got: ' { type (value).__name__ } ' " )
131+ value = str
132+ f " Unknown recived type, got: ' { type (value).__name__ } ' "
131133
132134 **Bad: **
133135
134136.. code-block :: python
135137
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
138+ value = str
139+ f " Unknown recived type, got: { repr (type (value).__name__ )} "
199140
You can’t perform that action at this time.
0 commit comments