diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-27 12:47:20 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-11-27 13:23:17 +0300 |
commit | 44e766520ceb4ac9d4a2f1dad1a00d7f6db79359 (patch) | |
tree | bc12e1166dd34fda3ed8d28b9631c4e385267d8a /contrib | |
parent | d31477e5ed13679dd3b409b100623cc81a5e0964 (diff) | |
download | ydb-44e766520ceb4ac9d4a2f1dad1a00d7f6db79359.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib')
7 files changed, 30 insertions, 11 deletions
diff --git a/contrib/python/argcomplete/py3/.dist-info/METADATA b/contrib/python/argcomplete/py3/.dist-info/METADATA index 4998ab3f8c..d9b6891313 100644 --- a/contrib/python/argcomplete/py3/.dist-info/METADATA +++ b/contrib/python/argcomplete/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: argcomplete -Version: 3.1.4 +Version: 3.1.6 Summary: Bash tab completion for argparse Home-page: https://github.com/kislyuk/argcomplete Author: Andrey Kislyuk diff --git a/contrib/python/argcomplete/py3/argcomplete/finders.py b/contrib/python/argcomplete/py3/argcomplete/finders.py index bf8e0e25f8..95af973b1a 100644 --- a/contrib/python/argcomplete/py3/argcomplete/finders.py +++ b/contrib/python/argcomplete/py3/argcomplete/finders.py @@ -525,19 +525,29 @@ class CompletionFinder(object): special_chars = special_chars.replace('`', '') else: escape_char = "\\" - for char in special_chars: - completions = [c.replace(char, escape_char + char) for c in completions] + if os.environ.get("_ARGCOMPLETE_SHELL") == "zsh": + # zsh uses colon as a separator between a completion and its description. + special_chars += ":" + + escaped_completions = [] + for completion in completions: + escaped_completion = completion + for char in special_chars: + escaped_completion = escaped_completion.replace(char, escape_char + char) + escaped_completions.append(escaped_completion) + if completion in self._display_completions: + self._display_completions[escaped_completion] = self._display_completions[completion] if self.append_space: # Similar functionality in bash was previously turned off by supplying the "-o nospace" option to complete. # Now it is conditionally disabled using "compopt -o nospace" if the match ends in a continuation character. # This code is retained for environments where this isn't done natively. continuation_chars = "=/:" - if len(completions) == 1 and completions[0][-1] not in continuation_chars: + if len(escaped_completions) == 1 and escaped_completions[0][-1] not in continuation_chars: if cword_prequote == "": - completions[0] += " " + escaped_completions[0] += " " - return completions + return escaped_completions def rl_complete(self, text, state): """ @@ -569,7 +579,7 @@ class CompletionFinder(object): def get_display_completions(self): """ - This function returns a mapping of option names to their help strings for displaying to the user. + This function returns a mapping of completions to their help strings for displaying to the user. """ return self._display_completions diff --git a/contrib/python/argcomplete/py3/ya.make b/contrib/python/argcomplete/py3/ya.make index 87550994a9..6c09efa674 100644 --- a/contrib/python/argcomplete/py3/ya.make +++ b/contrib/python/argcomplete/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.1.4) +VERSION(3.1.6) LICENSE(Apache-2.0) diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA index c58ef1bbbe..80eb231761 100644 --- a/contrib/python/hypothesis/py3/.dist-info/METADATA +++ b/contrib/python/hypothesis/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hypothesis -Version: 6.88.3 +Version: 6.88.4 Summary: A library for property-based testing Home-page: https://hypothesis.works Author: David R. MacIver and Zac Hatfield-Dodds diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py index 70a58866cb..e3d7808943 100644 --- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py +++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/core.py @@ -55,6 +55,7 @@ import attr from hypothesis._settings import note_deprecation from hypothesis.control import cleanup, current_build_context, note from hypothesis.errors import ( + HypothesisWarning, InvalidArgument, ResolutionFailed, RewindRecursive, @@ -1786,6 +1787,14 @@ def _composite(f): since="2022-07-17", has_codemod=False, ) + if get_origin(sig.return_annotation) is SearchStrategy: + ret_repr = repr(sig.return_annotation).replace("hypothesis.strategies.", "st.") + warnings.warn( + f"Return-type annotation is `{ret_repr}`, but the decorated " + "function should return a value (not a strategy)", + HypothesisWarning, + stacklevel=3 if sys.version_info[:2] > (3, 9) else 5, # ugh + ) if params[0].kind.name != "VAR_POSITIONAL": params = params[1:] newsig = sig.replace( diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py index 1388e5b7b1..1177a5d565 100644 --- a/contrib/python/hypothesis/py3/hypothesis/version.py +++ b/contrib/python/hypothesis/py3/hypothesis/version.py @@ -8,5 +8,5 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. -__version_info__ = (6, 88, 3) +__version_info__ = (6, 88, 4) __version__ = ".".join(map(str, __version_info__)) diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make index 785cd29b78..bd0d770d7a 100644 --- a/contrib/python/hypothesis/py3/ya.make +++ b/contrib/python/hypothesis/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(6.88.3) +VERSION(6.88.4) LICENSE(MPL-2.0) |