Skip to content

Commit 8aea87c

Browse files
committed
Fix other sphinx warnings. Fixes #201.
1 parent d575110 commit 8aea87c

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

path/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def __fspath__(self):
235235
def getcwd(cls):
236236
"""Return the current working directory as a path object.
237237
238-
.. seealso:: :func:`os.getcwdu`
238+
.. seealso:: :func:`os.getcwd`
239239
"""
240240
return cls(os.getcwd())
241241

@@ -399,7 +399,6 @@ def stripext(self):
399399
return self.splitext()[0]
400400

401401
def splitunc(self):
402-
""".. seealso:: :func:`os.path.splitunc`"""
403402
unc, rest = self.module.splitunc(self)
404403
return self._next_class(unc), rest
405404

@@ -598,8 +597,8 @@ def fnmatch(self, pattern, normcase=None):
598597
attribute, it is applied to the name and path prior to comparison.
599598
600599
`normcase` - (optional) A function used to normalize the pattern and
601-
filename before matching. Defaults to :meth:`self.module`, which
602-
defaults to :meth:`os.path.normcase`.
600+
filename before matching. Defaults to normcase from
601+
``self.module``, :func:`os.path.normcase`.
603602
604603
.. seealso:: :func:`fnmatch.fnmatch`
605604
"""
@@ -648,10 +647,10 @@ def iglob(self, pattern):
648647
# --- Reading or writing an entire file at once.
649648

650649
def open(self, *args, **kwargs):
651-
"""Open this file and return a corresponding :class:`file` object.
650+
"""Open this file and return a corresponding file object.
652651
653652
Keyword arguments work as in :func:`io.open`. If the file cannot be
654-
opened, an :class:`~exceptions.OSError` is raised.
653+
opened, an :class:`OSError` is raised.
655654
"""
656655
return io.open(self, *args, **kwargs)
657656

@@ -835,7 +834,7 @@ def write_lines(
835834
default is os.linesep, which is platform-dependent
836835
(``'\r\n'`` on Windows, ``'\n'`` on Unix, etc.).
837836
Specify ``None`` to write the lines as-is, like
838-
:meth:`file.writelines`.
837+
``.writelines`` on a file object.
839838
840839
Use the keyword argument ``append=True`` to append lines to the
841840
file. The default is to overwrite the file.

0 commit comments

Comments
 (0)