Skip to content

Commit

Permalink
Removed shtab experimental warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvilsa committed Aug 15, 2024
1 parent f7aa49f commit ff86083
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Fixed
- ``List`` type incorrectly using defaults from previous item (`#560
<https://github.com/omni-us/jsonargparse/pull/560>`__).

Changed
^^^^^^^
- Removed shtab experimental warning.


v4.32.0 (2024-07-19)
--------------------
Expand Down
2 changes: 0 additions & 2 deletions jsonargparse/_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import locale
import os
import re
import warnings
from collections import defaultdict
from contextlib import contextmanager, suppress
from contextvars import ContextVar
Expand Down Expand Up @@ -97,7 +96,6 @@ def __init__(
def __call__(self, parser, namespace, shell, option_string=None):
import shtab

warnings.warn("Automatic shtab support is experimental and subject to change.", UserWarning)
prog = norm_name(parser.prog)
assert prog
preambles = []
Expand Down
6 changes: 1 addition & 5 deletions jsonargparse_tests/test_shtab.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from pathlib import Path
from typing import Any, Callable, Optional, Union
from unittest.mock import patch
from warnings import catch_warnings

import pytest

Expand Down Expand Up @@ -45,10 +44,7 @@ def parser() -> ArgumentParser:


def get_shtab_script(parser, shell):
with catch_warnings(record=True) as w:
shtab_script = get_parse_args_stdout(parser, [f"--print_shtab={shell}"])
assert "support is experimental" in str(w[0].message)
return shtab_script
return get_parse_args_stdout(parser, [f"--print_shtab={shell}"])


def assert_bash_typehint_completions(subtests, shtab_script, completions):
Expand Down

0 comments on commit ff86083

Please sign in to comment.