Skip to content

Commit 45f880b

Browse files
FHaasejreback
authored andcommitted
Fix PEP-8 issues in contributing.rst (#24003)
1 parent e4d494b commit 45f880b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

doc/source/contributing.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,8 @@ Otherwise, you need to do it manually:
670670

671671
.. code-block:: python
672672
673+
import warnings
674+
673675
def old_func():
674676
"""Summary of the function.
675677
@@ -679,6 +681,9 @@ Otherwise, you need to do it manually:
679681
warnings.warn('Use new_func instead.', FutureWarning, stacklevel=2)
680682
new_func()
681683
684+
def new_func():
685+
pass
686+
682687
You'll also need to
683688

684689
1. write a new test that asserts a warning is issued when calling with the deprecated argument
@@ -933,6 +938,8 @@ If your change involves checking that a warning is actually emitted, use
933938

934939
.. code-block:: python
935940
941+
df = pd.DataFrame()
942+
936943
with tm.assert_produces_warning(FutureWarning):
937944
df.some_operation()
938945
@@ -963,7 +970,7 @@ a single test.
963970

964971
.. code-block:: python
965972
966-
with warch.catch_warnings():
973+
with warnings.catch_warnings():
967974
warnings.simplefilter("ignore", FutureWarning)
968975
# Or use warnings.filterwarnings(...)
969976

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ exclude =
7373
doc/source/comparison_with_sql.rst
7474
doc/source/comparison_with_stata.rst
7575
doc/source/computation.rst
76-
doc/source/contributing.rst
7776
doc/source/contributing_docstring.rst
7877
doc/source/dsintro.rst
7978
doc/source/enhancingperf.rst

0 commit comments

Comments
 (0)