Skip to content

Commit 25dd279

Browse files
committed
📝 docs: fix punctuation and grammar
Ensure all sentences end with proper punctuation. Fix "discover" typo to "class" in explanation page. Standardize list item and comment punctuation across all doc pages.
1 parent 9b588c0 commit 25dd279

4 files changed

Lines changed: 31 additions & 31 deletions

File tree

docs/explanation.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ How py-discovery works
44
Discovery strategy
55
------------------
66

7-
The :class:`~py_discovery.Builtin` discover searches for Python interpreters in the following order:
7+
The :class:`~py_discovery.Builtin` class searches for Python interpreters in the following order.
88

99
.. mermaid::
1010

@@ -31,7 +31,7 @@ The :class:`~py_discovery.Builtin` discover searches for Python interpreters in
3131
Verify -->|No match| Next["Try next candidate"]
3232

3333
Each candidate is verified by running it as a subprocess to collect its metadata (version, architecture, platform,
34-
sysconfig paths, etc.). Verified interpreters are cached to avoid repeating this subprocess call.
34+
sysconfig paths, and more). Verified interpreters are cached to avoid repeating this subprocess call.
3535

3636
Shim resolution
3737
---------------
@@ -50,8 +50,8 @@ py-discovery detects this and resolves it to the real binary:
5050
Global -->|Yes| Use
5151
Global -->|No| Skip["Skip shim"]
5252

53-
For mise and asdf, the ``MISE_DATA_DIR`` / ``ASDF_DATA_DIR`` directories are searched. The shim directory is
54-
identified via ``PYENV_ROOT``, ``MISE_DATA_DIR``, or ``ASDF_DATA_DIR`` environment variables.
53+
For mise and asdf, the ``MISE_DATA_DIR`` and ``ASDF_DATA_DIR`` directories are searched. The shim directory is
54+
identified via the ``PYENV_ROOT``, ``MISE_DATA_DIR``, or ``ASDF_DATA_DIR`` environment variables.
5555

5656
Cache design
5757
------------
@@ -73,8 +73,8 @@ ensures safe concurrent access.
7373
The cache layer uses a :class:`typing.Protocol` (:class:`~py_discovery.PyInfoCache`), so any object with the right
7474
method signatures works as a cache backend -- no inheritance required. Two built-in implementations are provided:
7575

76-
- :class:`~py_discovery.DiskCache` -- persistent JSON + filelock storage
77-
- :class:`~py_discovery.NoOpCache` -- no-op, useful for one-shot scripts or testing
76+
- :class:`~py_discovery.DiskCache` -- persistent JSON + filelock storage.
77+
- :class:`~py_discovery.NoOpCache` -- no-op, useful for one-shot scripts or testing.
7878

7979
Spec format
8080
-----------
@@ -120,9 +120,9 @@ A spec string follows the pattern ``[impl][version][t][-arch][-machine]``:
120120
| ``cpython>=3.11`` | PEP 440 specifier with implementation filter |
121121
+------------------------------+-----------------------------------------------+
122122

123-
The ``impl`` prefix is optional; ``python`` and ``py`` are treated as "any implementation". The ``t`` suffix matches
124-
free-threaded (no-GIL) builds. Architecture (``-32`` or ``-64``) and ISA (``-arm64``, ``-x86_64``, etc.) are optional
125-
suffixes separated by dashes.
123+
The ``impl`` prefix is optional; ``python`` and ``py`` are treated as "any implementation." The ``t`` suffix matches
124+
free-threaded (no-GIL) builds. Architecture (``-32`` or ``-64``) and ISA (``-arm64``, ``-x86_64``, and others) are
125+
optional suffixes separated by dashes.
126126

127127
PEP 440 specifiers (``>=``, ``<=``, ``~=``, ``!=``, ``==``, ``===``) are supported for flexible version matching.
128-
Multiple specifiers can be comma-separated: ``>=3.11,<3.13``.
128+
Multiple specifiers can be comma-separated, for example ``>=3.11,<3.13``.

docs/how-to/standalone-usage.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ For lower-level control, use :func:`~py_discovery.get_interpreter` instead of th
5050
if info is not None:
5151
print(info.executable)
5252
53-
The ``try_first_with`` parameter takes paths to check before the normal discovery strategy.
53+
The ``try_first_with`` parameter takes paths to check before the normal discovery strategy runs.
5454

5555
Controlling the environment
5656
---------------------------
@@ -82,14 +82,14 @@ A :class:`~py_discovery.PythonInfo` object exposes detailed interpreter metadata
8282
cache = DiskCache(root=Path("~/.cache/py-discovery").expanduser())
8383
info = Builtin(python_spec=["python3.12"], cache=cache).run()
8484
85-
info.executable # resolved path to the binary
86-
info.system_executable # the system (non-venv) executable
85+
info.executable # Resolved path to the binary.
86+
info.system_executable # The system (non-venv) executable.
8787
info.implementation # "CPython", "PyPy", etc.
88-
info.version_info # VersionInfo(major, minor, micro, releaselevel, serial)
89-
info.architecture # 64 or 32
90-
info.platform # sys.platform value ("linux", "darwin", "win32")
91-
info.sysconfig_vars # dict of sysconfig variables
92-
info.sysconfig_paths # dict of sysconfig paths
88+
info.version_info # VersionInfo(major, minor, micro, releaselevel, serial).
89+
info.architecture # 64 or 32.
90+
info.platform # sys.platform value ("linux", "darwin", "win32").
91+
info.sysconfig_vars # Dict of sysconfig variables.
92+
info.sysconfig_paths # Dict of sysconfig paths.
9393
9494
Parsing specs without discovery
9595
-------------------------------

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Tutorial
1616
:doc:`tutorial/getting-started`
1717
Install py-discovery, find interpreters, and inspect their metadata.
1818

19-
How-to guides
19+
How-to Guides
2020
-------------
2121

2222
.. toctree::

docs/tutorial/getting-started.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,28 @@ Use :class:`~py_discovery.Builtin` to find an interpreter matching a specificati
4141
if result is not None:
4242
print(result.executable)
4343
44-
The ``python_spec`` parameter accepts a list of spec strings to try in order. The first match wins.
44+
The ``python_spec`` parameter accepts a list of spec strings to try in order, and the first match wins.
4545

4646
Spec syntax
4747
-----------
4848

4949
Specs follow the pattern ``[impl][version][t][-arch][-machine]``:
5050

51-
- ``python3.12`` -- CPython 3.12
52-
- ``cpython3.12`` -- explicitly CPython 3.12
53-
- ``pypy3.9`` -- PyPy 3.9
54-
- ``3.12`` -- any implementation, version 3.12
55-
- ``python3.12t`` -- free-threaded CPython 3.12
56-
- ``python3.12-64`` -- 64-bit CPython 3.12
57-
- ``python3.12-64-arm64`` -- 64-bit CPython 3.12 on ARM64
58-
- ``/usr/bin/python3`` -- absolute path, used directly
59-
- ``>=3.11,<3.13`` -- PEP 440 version specifier
60-
- ``cpython>=3.11`` -- PEP 440 specifier with implementation filter
51+
- ``python3.12`` -- CPython 3.12.
52+
- ``cpython3.12`` -- explicitly CPython 3.12.
53+
- ``pypy3.9`` -- PyPy 3.9.
54+
- ``3.12`` -- any implementation, version 3.12.
55+
- ``python3.12t`` -- free-threaded CPython 3.12.
56+
- ``python3.12-64`` -- 64-bit CPython 3.12.
57+
- ``python3.12-64-arm64`` -- 64-bit CPython 3.12 on ARM64.
58+
- ``/usr/bin/python3`` -- absolute path, used directly.
59+
- ``>=3.11,<3.13`` -- PEP 440 version specifier.
60+
- ``cpython>=3.11`` -- PEP 440 specifier with implementation filter.
6161

6262
Without caching
6363
---------------
6464

65-
Pass ``cache=None`` to skip caching entirely. Each discovery will invoke the interpreter subprocess:
65+
Pass ``cache=None`` to skip caching entirely; each discovery will invoke the interpreter subprocess directly.
6666

6767
.. code-block:: python
6868

0 commit comments

Comments
 (0)