Skip to content

Commit 8469f44

Browse files
authored
Merge pull request #9970 from ezio-melotti/fix-tempdirfactory-docstring
Fix rst markup in TempdirFactory's docstring.
2 parents 08c0eb6 + a1ed683 commit 8469f44

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ repos:
101101
types: [python]
102102
- id: py-path-deprecated
103103
name: py.path usage is deprecated
104-
exclude: docs|src/_pytest/deprecated.py|testing/deprecated_test.py
104+
exclude: docs|src/_pytest/deprecated.py|testing/deprecated_test.py|src/_pytest/legacypath.py
105105
language: pygrep
106106
entry: \bpy\.path\.local
107107
types: [python]

src/_pytest/legacypath.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ def testdir(pytester: Pytester) -> Testdir:
270270
@final
271271
@attr.s(init=False, auto_attribs=True)
272272
class TempdirFactory:
273-
"""Backward compatibility wrapper that implements :class:``_pytest.compat.LEGACY_PATH``
274-
for :class:``TempPathFactory``."""
273+
"""Backward compatibility wrapper that implements :class:`py.path.local`
274+
for :class:`TempPathFactory`."""
275275

276276
_tmppath_factory: TempPathFactory
277277

@@ -282,11 +282,11 @@ def __init__(
282282
self._tmppath_factory = tmppath_factory
283283

284284
def mktemp(self, basename: str, numbered: bool = True) -> LEGACY_PATH:
285-
"""Same as :meth:`TempPathFactory.mktemp`, but returns a ``_pytest.compat.LEGACY_PATH`` object."""
285+
"""Same as :meth:`TempPathFactory.mktemp`, but returns a :class:`py.path.local` object."""
286286
return legacy_path(self._tmppath_factory.mktemp(basename, numbered).resolve())
287287

288288
def getbasetemp(self) -> LEGACY_PATH:
289-
"""Backward compat wrapper for ``_tmppath_factory.getbasetemp``."""
289+
"""Same as :meth:`TempPathFactory.getbasetemp`, but returns a :class:`py.path.local` object."""
290290
return legacy_path(self._tmppath_factory.getbasetemp().resolve())
291291

292292

0 commit comments

Comments
 (0)