diff --git a/pandas/core/strings.py b/pandas/core/strings.py index 18c7504f2c2f8..a4648186477d6 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -2013,7 +2013,7 @@ def wrapper3(self, pat, na=np.nan): def copy(source): - "Copy a docstring from another source function (if present)" + """Copy a docstring from another source function (if present)""" def do_copy(target): if source.__doc__: diff --git a/pandas/io/clipboard/__init__.py b/pandas/io/clipboard/__init__.py index f808b7e706afb..6d76d7de407b1 100644 --- a/pandas/io/clipboard/__init__.py +++ b/pandas/io/clipboard/__init__.py @@ -126,7 +126,7 @@ def copy_osx_pyobjc(text): board.setData_forType_(newData, AppKit.NSStringPboardType) def paste_osx_pyobjc(): - "Returns contents of clipboard" + """Returns contents of clipboard""" board = AppKit.NSPasteboard.generalPasteboard() content = board.stringForType_(AppKit.NSStringPboardType) return content diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index 8bc8470ae7658..daafa9eee69fe 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -2488,7 +2488,7 @@ def get_chunk(self, size=None): def _convert_data(self, data): # apply converters def _clean_mapping(mapping): - "converts col numbers to names" + """converts col numbers to names""" clean = {} for col, v in mapping.items(): if isinstance(col, int) and col not in self.orig_names: diff --git a/pandas/plotting/_matplotlib/converter.py b/pandas/plotting/_matplotlib/converter.py index a1035fd0823bb..770f89324badb 100644 --- a/pandas/plotting/_matplotlib/converter.py +++ b/pandas/plotting/_matplotlib/converter.py @@ -981,7 +981,7 @@ def __init__( self.finder = get_finder(freq) def _get_default_locs(self, vmin, vmax): - "Returns the default locations of ticks." + """Returns the default locations of ticks.""" if self.plot_obj.date_axis_info is None: self.plot_obj.date_axis_info = self.finder(vmin, vmax, self.freq) @@ -993,7 +993,7 @@ def _get_default_locs(self, vmin, vmax): return np.compress(locator["maj"], locator["val"]) def __call__(self): - "Return the locations of the ticks." + """Return the locations of the ticks.""" # axis calls Locator.set_axis inside set_m_formatter vi = tuple(self.axis.get_view_interval()) @@ -1062,7 +1062,7 @@ def __init__(self, freq, minor_locator=False, dynamic_mode=True, plot_obj=None): self.finder = get_finder(freq) def _set_default_format(self, vmin, vmax): - "Returns the default ticks spacing." + """Returns the default ticks spacing.""" if self.plot_obj.date_axis_info is None: self.plot_obj.date_axis_info = self.finder(vmin, vmax, self.freq) @@ -1076,7 +1076,7 @@ def _set_default_format(self, vmin, vmax): return self.formatdict def set_locs(self, locs): - "Sets the locations of the ticks" + """Sets the locations of the ticks""" # don't actually use the locs. This is just needed to work with # matplotlib. Force to use vmin, vmax diff --git a/pandas/tests/scalar/period/test_period.py b/pandas/tests/scalar/period/test_period.py index b396a88e6eb6a..3846274dacd75 100644 --- a/pandas/tests/scalar/period/test_period.py +++ b/pandas/tests/scalar/period/test_period.py @@ -650,7 +650,7 @@ def test_strftime(self): class TestPeriodProperties: - "Test properties such as year, month, weekday, etc...." + """Test properties such as year, month, weekday, etc....""" @pytest.mark.parametrize("freq", ["A", "M", "D", "H"]) def test_is_leap_year(self, freq):