Skip to content

Commit 4863a96

Browse files
committed
DOC: Fixes flake8 issues in whatsnew v0.13.* pandas-dev#24256
Another attempt to get the conflicts resolved with setup.cfg Incorporated the requested changes.
1 parent 9840ea4 commit 4863a96

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

doc/source/whatsnew/v0.13.0.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ API changes
119119

120120
This prevents doing boolean comparison on *entire* pandas objects, which is inherently ambiguous. These all will raise a ``ValueError``.
121121

122-
.. code-block:: python
123-
:flake8-group: Ignore # Documentation says this is necessary for mandatory E999 (if df:)
122+
.. code-block:: text
124123
125124
>>> if df:
126-
...
125+
pass
126+
127127
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty,
128128
a.bool(), a.item(), a.any() or a.all().
129129
@@ -494,10 +494,10 @@ Enhancements
494494

495495
.. ipython:: python
496496
497-
from datetime import timedelta
497+
import datetime
498498
td = pd.Series(pd.date_range('20130101', periods=4)) - pd.Series(
499499
pd.date_range('20121201', periods=4))
500-
td[2] += np.timedelta64(timedelta(minutes=5, seconds=3))
500+
td[2] += np.timedelta64(datetime.timedelta(minutes=5, seconds=3))
501501
td[3] = np.nan
502502
td
503503
@@ -528,7 +528,7 @@ Enhancements
528528
.. ipython:: python
529529
530530
td.fillna(0)
531-
td.fillna(timedelta(days=1, seconds=5))
531+
td.fillna(datetime.timedelta(days=1, seconds=5))
532532
533533
You can do numeric reduction operations on timedeltas.
534534

@@ -838,7 +838,7 @@ Experimental
838838
# Your Google BigQuery Project ID
839839
# To find this, see your dashboard:
840840
# https://console.developers.google.com/iam-admin/projects?authuser=0
841-
projectid = xxxxxxxxx; # noqa F821
841+
projectid = 'xxxxxxxxx'
842842
df = gbq.read_gbq(query, project_id=projectid)
843843
844844
# Use pandas to process and reshape the dataset

doc/source/whatsnew/v0.13.1.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,10 @@ Output Formatting Enhancements
8686
- The ``ArrayFormatter`` for ``datetime`` and ``timedelta64`` now intelligently
8787
limit precision based on the values in the array (:issue:`3401`)
8888

89-
Previously output might look like:::
89+
Previously output might look like:
90+
91+
.. oode-block:: text
9092

91-
>>> df = pd.DataFrame([pd.Timestamp('20010101'),
92-
pd.Timestamp('20040601')], columns=['age'])
93-
>>> df['today'] = pd.Timestamp('20130419')
94-
>>> df['diff'] = df['today'] - df['age']
95-
>>> df
9693
age today diff
9794
0 2001-01-01 00:00:00 2013-04-19 00:00:00 4491 days, 00:00:00
9895
1 2004-06-01 00:00:00 2013-04-19 00:00:00 3244 days, 00:00:00

setup.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ ignore = E402, # module level import not at top of file
4545
E703, # statement ends with a semicolon
4646

4747
exclude =
48-
doc/source/whatsnew/v0.13.0.rst
49-
doc/source/whatsnew/v0.13.1.rst
5048
doc/source/whatsnew/v0.15.0.rst
5149
doc/source/whatsnew/v0.15.1.rst
5250
doc/source/whatsnew/v0.15.2.rst

0 commit comments

Comments
 (0)