Skip to content

Commit

Permalink
Fixes for datapythonista's review
Browse files Browse the repository at this point in the history
  • Loading branch information
MomIsBestFriend committed Dec 29, 2019
1 parent fbfb3c9 commit 03d3147
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 74 deletions.
3 changes: 1 addition & 2 deletions doc/source/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,7 @@ do not make sudden changes to the code that could have the potential to break
a lot of user code as a result, that is, we need it to be as *backwards compatible*
as possible to avoid mass breakages.

Additional standards are outlined on the (Placeholder as a reminder to ask the
devs for the help on how to properly link the new created file)
Additional standards are outlined on the `pandas code style guide <contributing_code_guide>`_

Optional dependencies
---------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _Not_sure_what_to_put_here:
.. _contributing_code_guide:

{{ header }}

Expand Down Expand Up @@ -121,79 +121,12 @@ For example:

.. code-block:: python
raise ValueError(f"Unknown recived value, got: {repr(value)}")
value = str
f"Unknown recived value, got: {repr(value)}"
**Good:**

.. code-block:: python
raise ValueError(f"Unknown recived type, got: '{type(value).__name__}'")
**Bad:**

.. code-block:: python
raise ValueError(f"Unknown recived type, got: {repr(type(value).__name__)}")
Single and double quotes
------------------------

*pandas* uses single quotes when ....

For example:

**Good:**

.. code-block:: python
placeholder = True
**Bad:**

.. code-block:: python
placeholder = True
And using double quotes when....

For example:

**Good:**

.. code-block:: python
placeholder = True
**Bad:**

.. code-block:: python
placeholder = True
Typing
======

Annotating __init__
-------------------

*pandas* does not annotate the '__init__' function. it is redundant
as almost every '__init__' function will most like not to return anything.

For example:

**Good:**

.. code-block:: python
def __init__(self, name):
self.name = name
**Bad:**

.. code-block:: python
def __init__(self, name) -> None:
self.name = name
value = str
f"Unknown recived type, got: '{type(value).__name__}'"

0 comments on commit 03d3147

Please sign in to comment.