Skip to content

Commit 5f8bfac

Browse files
authored
DOC: Fix EX03 (#56854)
* Fix ex03 in errors.__init__.py * Remove unused error classes in code_checks.sh
1 parent 43d5dfc commit 5f8bfac

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7474
pandas.Series.plot.line \
7575
pandas.Series.to_sql \
7676
pandas.Series.to_latex \
77-
pandas.errors.CategoricalConversionWarning \
78-
pandas.errors.ChainedAssignmentError \
79-
pandas.errors.ClosedFileError \
8077
pandas.errors.DatabaseError \
8178
pandas.errors.IndexingError \
8279
pandas.errors.InvalidColumnName \
83-
pandas.errors.NumExprClobberingError \
8480
pandas.errors.PossibleDataLossError \
8581
pandas.errors.PossiblePrecisionLoss \
8682
pandas.errors.SettingWithCopyError \

pandas/errors/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ class ChainedAssignmentError(Warning):
469469
--------
470470
>>> pd.options.mode.copy_on_write = True
471471
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2]}, columns=['A'])
472-
>>> df["A"][0:3] = 10 # doctest: +SKIP
472+
>>> df["A"][0:3] = 10 # doctest: +SKIP
473473
... # ChainedAssignmentError: ...
474474
>>> pd.options.mode.copy_on_write = False
475475
"""
@@ -561,10 +561,10 @@ class NumExprClobberingError(NameError):
561561
Examples
562562
--------
563563
>>> df = pd.DataFrame({'abs': [1, 1, 1]})
564-
>>> df.query("abs > 2") # doctest: +SKIP
564+
>>> df.query("abs > 2") # doctest: +SKIP
565565
... # NumExprClobberingError: Variables in expression "(abs) > (2)" overlap...
566566
>>> sin, a = 1, 2
567-
>>> pd.eval("sin + a", engine='numexpr') # doctest: +SKIP
567+
>>> pd.eval("sin + a", engine='numexpr') # doctest: +SKIP
568568
... # NumExprClobberingError: Variables in expression "(sin) + (a)" overlap...
569569
"""
570570

@@ -677,9 +677,9 @@ class ClosedFileError(Exception):
677677
678678
Examples
679679
--------
680-
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
681-
>>> store.close() # doctest: +SKIP
682-
>>> store.keys() # doctest: +SKIP
680+
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
681+
>>> store.close() # doctest: +SKIP
682+
>>> store.keys() # doctest: +SKIP
683683
... # ClosedFileError: my-store file is not open!
684684
"""
685685

@@ -773,9 +773,9 @@ class CategoricalConversionWarning(Warning):
773773
Examples
774774
--------
775775
>>> from pandas.io.stata import StataReader
776-
>>> with StataReader('dta_file', chunksize=2) as reader: # doctest: +SKIP
777-
... for i, block in enumerate(reader):
778-
... print(i, block)
776+
>>> with StataReader('dta_file', chunksize=2) as reader: # doctest: +SKIP
777+
... for i, block in enumerate(reader):
778+
... print(i, block)
779779
... # CategoricalConversionWarning: One or more series with value labels...
780780
"""
781781

0 commit comments

Comments
 (0)