Skip to content

Commit

Permalink
Removed shtab experimental warning (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvilsa committed Sep 12, 2024
1 parent d901a1f commit 88c0387
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 @@ -24,6 +24,10 @@ Fixed
- Callable type with subclass return not showing the ``--*.help`` option (`#567
<https://github.com/omni-us/jsonargparse/pull/567>`__).

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


v4.32.1 (2024-08-23)
--------------------
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 88c0387

Please sign in to comment.