Skip to content

Commit 03d3147

Browse files
author
MomIsBestFriend
committed
Fixes for datapythonista's review
1 parent fbfb3c9 commit 03d3147

File tree

2 files changed

+6
-74
lines changed

2 files changed

+6
-74
lines changed

doc/source/development/contributing.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,7 @@ do not make sudden changes to the code that could have the potential to break
569569
a lot of user code as a result, that is, we need it to be as *backwards compatible*
570570
as 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

575574
Optional dependencies
576575
---------------------

doc/source/development/contributing_code_style.rst renamed to doc/source/development/contributing_code_guide.rst

+5-72
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Not_sure_what_to_put_here:
1+
.. _contributing_code_guide:
22

33
{{ header }}
44

@@ -121,79 +121,12 @@ 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-
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__}'"

0 commit comments

Comments
 (0)