Skip to content

Commit 693c3d8

Browse files
authored
Some fixes to docs (#803)
1 parent d9d4d35 commit 693c3d8

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

CHANGELOG.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Deprecated
5757
- ``dict_to_namespace`` is deprecated and will be removed in v5.0.0. No
5858
replacement is provided because blindly converting a dictionary to a namespace
5959
may not yield the same results as using a parser, which could lead to
60-
confusion. (`#797 <https://github.com/omni-us/jsonargparse/pull/797>`__).
60+
confusion (`#797 <https://github.com/omni-us/jsonargparse/pull/797>`__).
6161

6262

6363
v4.42.0 (2025-10-14)
@@ -477,11 +477,11 @@ Fixed
477477
- Callable type with subclass return not showing the ``--*.help`` option (`#567
478478
<https://github.com/omni-us/jsonargparse/pull/567>`__).
479479
- Forward referenced types not compatible with ``Type`` typehint (`#576
480-
<https://github.com/omni-us/jsonargparse/pull/576/>`__).
480+
<https://github.com/omni-us/jsonargparse/pull/576>`__).
481481
- Subclass nested in ``Iterable`` makes help fail (`#578
482482
<https://github.com/omni-us/jsonargparse/pull/578>`__).
483483
- ``Literal`` mixing enum values and strings failing to parse (`#580
484-
<https://github.com/omni-us/jsonargparse/pull/580/>`__).
484+
<https://github.com/omni-us/jsonargparse/pull/580>`__).
485485

486486
Changed
487487
^^^^^^^
@@ -825,39 +825,39 @@ Added
825825
<https://github.com/omni-us/jsonargparse/issues/366>`__).
826826
- New function ``extend_base_type`` for easy creation and registering of custom
827827
types that extend a base type (`#195
828-
<https://github.com/omni-us/jsonargparse/issue/195>`__).
828+
<https://github.com/omni-us/jsonargparse/issues/195>`__).
829829
- Support for ``Annotated`` types either ignoring the metadata or using it for
830830
validation in case of `pydantic types
831831
<https://docs.pydantic.dev/latest/api/types/>`__ (`#384
832-
<https://github.com/omni-us/jsonargparse/issue/384>`__).
832+
<https://github.com/omni-us/jsonargparse/issues/384>`__).
833833
- Support for Python 3.12.
834834

835835
Fixed
836836
^^^^^
837837
- ``--print_config`` fails when parser has shallow links.
838838
- Argument links unnecessarily applied when ``--print_config`` used and parser
839-
has subcommands (`#311 <https://github.com/omni-us/jsonargparse/issue/311>`__).
839+
has subcommands (`#311 <https://github.com/omni-us/jsonargparse/issues/311>`__).
840840
- Parsing fails when data type is a ``Callable`` with multiple input arguments
841841
(`#372 <https://github.com/omni-us/jsonargparse/issues/372>`__).
842842
- Postponed annotations not working for dataclasses.
843843
- Unsupported pop/get default incorrectly sets default as ``None``
844844
(`lightning#18616
845845
<https://github.com/Lightning-AI/lightning/issues/18616>`__).
846846
- Pydantic models and dataclasses not working for ``pydantic>=2.0.0`` (`#361
847-
<https://github.com/omni-us/jsonargparse/issue/361>`__).
847+
<https://github.com/omni-us/jsonargparse/issues/361>`__).
848848

849849
Changed
850850
^^^^^^^
851851
- Provide a more informative error message to remind user to select
852852
and provide a subcommand when a subcommand is required but not
853853
given (`#371 <https://github.com/omni-us/jsonargparse/pull/371>`__).
854854
- Now when an argument link ``compute_fn`` fails, the error message will say
855-
this (`#311 <https://github.com/omni-us/jsonargparse/issue/311>`__).
855+
this (`#311 <https://github.com/omni-us/jsonargparse/issues/311>`__).
856856
- ``add_subclass_arguments`` now shows a better error message when an empty
857857
tuple is given (`lightning#18546
858858
<https://github.com/Lightning-AI/lightning/issues/18546>`__).
859859
- Document the requirements for creating and using custom types (`#195
860-
<https://github.com/omni-us/jsonargparse/issue/195>`__).
860+
<https://github.com/omni-us/jsonargparse/issues/195>`__).
861861
- Parameters with default and without type, now get as type
862862
``Union[type(default), Any]``.
863863
- Removed support for python 3.6.
@@ -2009,7 +2009,7 @@ v3.16.0 (2021-07-05)
20092009
--------------------
20102010

20112011
Added
2012-
-----
2012+
^^^^^
20132013
- ``lazy_instance`` function for serializable class type defaults.
20142014
- Support for parsing multiple matched default config files (`#58
20152015
<https://github.com/omni-us/jsonargparse/issues/58>`__).

CONTRIBUTING.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Contributing
44
Contributions to jsonargparse are very welcome. There are multiple ways for
55
people to help and contribute, among them:
66

7-
- Star ⭐ the github project `<https://github.com/omni-us/jsonargparse/>`__.
7+
- Star ⭐ the GitHub project `<https://github.com/omni-us/jsonargparse/>`__.
88
- `Sponsor 🩷 <https://github.com/sponsors/mauvilsa>`__ its maintenance and
99
development.
1010
- Spread the word in your community about the features you like from
1111
jsonargparse.
1212
- Help others to learn how to use jsonargparse by creating tutorials, such as
1313
blog posts and videos.
14-
- Become active in existing github issues and pull requests.
14+
- Become active in existing GitHub issues and pull requests.
1515
- Create `issues <https://github.com/omni-us/jsonargparse/issues>`__ for
1616
reporting bugs and proposing improvements.
1717
- Create `pull requests <https://github.com/omni-us/jsonargparse/pulls>`__ with
@@ -80,8 +80,8 @@ some time to complete. If you wish to push without running these hooks, use the
8080
command ``git push --no-verify``.
8181

8282
Formatting of the code is done automatically by pre-commit. If some pre-commit
83-
hooks fail and you decide to skip them, the formatting will be automatically
84-
applied by a github action in pull requests.
83+
hooks fail and you decide to skip them, formatting will be automatically applied
84+
by a GitHub action in pull requests.
8585

8686
Documentation
8787
-------------
@@ -101,8 +101,8 @@ Tests
101101
Running the unit tests can be done either using `pytest
102102
<https://docs.pytest.org/>`__ or `tox
103103
<https://tox.readthedocs.io/en/stable/>`__. The tests are also installed with
104-
the package, thus can be run in a production system. Also pre-commit runs some
105-
additional tests.
104+
the package and can be run in a non-development environment. Also pre-commit
105+
runs some additional tests.
106106

107107
.. code-block:: bash
108108
@@ -138,8 +138,8 @@ Then open the file ``jsonargparse_tests/htmlcov/index.html`` in a browser.
138138
Pull requests
139139
-------------
140140

141-
When creating a pull request, it is recommended that in your fork, create a
142-
specific branch for the changes you want to contribute, instead of using the
141+
When creating a pull request, it is recommended that you create a specific
142+
branch in your fork for the changes you want to contribute, instead of using the
143143
``main`` branch.
144144

145145
The required tasks to do for a pull request, are listed in

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ CLI with minimal boilerplate:
3636
3737
from jsonargparse import auto_cli
3838
39-
def main_function(...): # your main parameters and logic here
40-
...
39+
def main_function(...): # your main parameters with type hints here
40+
... # your main code here
4141
4242
if __name__ == "__main__":
4343
auto_cli(main_function) # parses arguments and runs main_function
@@ -197,4 +197,4 @@ To install the latest development version, use the following command:
197197

198198
.. code-block:: bash
199199
200-
pip install "jsonargparse[signatures] @ git+https://github.com/omni-us/jsonargparse.git@main"
200+
pip install "jsonargparse[signatures] @ https://github.com/omni-us/jsonargparse/zipball/main"

jsonargparse/_from_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def from_config(cls: Type[T], config: Union[str, PathLike, dict]) -> T:
5252

5353

5454
def _parse_class_kwargs_from_config(cls: Type[T], config: Union[str, PathLike, dict], **kwargs) -> dict:
55-
"""Parse the init kwargs for `cls` from a config file or dict."""
55+
"""Parse the init kwargs for ``cls`` from a config file or dict."""
5656
parser = ArgumentParser(exit_on_error=False, **kwargs)
5757
parser.add_class_arguments(cls)
5858
if isinstance(config, dict):
@@ -121,7 +121,7 @@ def _override_init_defaults_parent_classes(cls: Type[T], defaults: dict) -> None
121121
kwargs_param = parameters.pop()
122122

123123
# Add new parameters
124-
for param in reversed(override_parent_params):
124+
for param in override_parent_params:
125125
parameters.append(param)
126126

127127
# Add **kwargs back at the end

0 commit comments

Comments
 (0)