Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: Generate Pathlib table with autosummary #126753

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
]

# Skip if downstream redistributors haven't installed them
Expand Down
124 changes: 124 additions & 0 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,130 @@
'#!/bin/bash\n'


Summary
-------

.. currentmodule:: pathlib

.. autosummary::

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import UnsupportedOperation.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import PurePath.parser.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import PurePath.full_match.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import Path.from_uri.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import Path.scandir.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import Path.copy.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import Path.copy_into.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import Path.move.

Check warning on line 101 in Doc/library/pathlib.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

autosummary: failed to import Path.move_into.

.. **Exceptions**

UnsupportedOperation

.. **Pure paths**

PurePath
PurePosixPath
PureWindowsPath

.. **Pure path attributes**

PurePath.parts
PurePath.parser
PurePath.drive
PurePath.root
PurePath.anchor
PurePath.parents
PurePath.parent
PurePath.name
PurePath.suffix
PurePath.suffixes
PurePath.stem

.. **Pure path methods**

PurePath.as_posix
PurePath.is_absolute
PurePath.is_relative_to
PurePath.is_reserved
PurePath.joinpath
PurePath.full_match
PurePath.match
PurePath.relative_to
PurePath.with_name
PurePath.with_stem
PurePath.with_suffix
PurePath.with_segments

.. **Concrete paths**

Path
PosixPath
WindowsPath

.. **Parsing and generating URIs**

Path.from_uri
Path.as_uri

.. **Expanding and resolving paths**

Path.home
Path.expanduser
Path.cwd
Path.absolute
Path.resolve
Path.readlink

.. **Querying file type and status**

Path.stat
Path.lstat
Path.exists
Path.is_file
Path.is_dir
Path.is_symlink
Path.is_junction
Path.is_mount
Path.is_socket
Path.is_fifo
Path.is_block_device
Path.is_char_device
Path.samefile

.. **Reading and writing files**

Path.open
Path.read_text
Path.read_bytes
Path.write_text
Path.write_bytes

.. **Reading directories**

Path.iterdir
Path.scandir
Path.glob
Path.rglob
Path.walk

.. **Creating files and directories**

Path.touch
Path.mkdir
Path.symlink_to
Path.hardlink_to

.. **Copying, moving and deleting**

Path.copy
Path.copy_into
Path.rename
Path.replace
Path.move
Path.move_into
Path.unlink
Path.rmdir

.. **Permissions and ownership**

Path.owner
Path.group
Path.chmod
Path.lchmod


Exceptions
----------

Expand Down
Loading