aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Automat/py3/automat/_methodical.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-05-01 08:17:52 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-05-01 08:51:42 +0300
commita24e6ced72db4dbcfba43e2f8c630986b2c9c38b (patch)
tree156032c5cb5c761d6ff5ce1b1b02a12b9144965e /contrib/python/Automat/py3/automat/_methodical.py
parent8a6954f35eee99eef660e76e775774d720e111a9 (diff)
downloadydb-a24e6ced72db4dbcfba43e2f8c630986b2c9c38b.tar.gz
Intermediate changes
commit_hash:cf346718d9edcad89c318fd6e8b49aedd93f0fba
Diffstat (limited to 'contrib/python/Automat/py3/automat/_methodical.py')
-rw-r--r--contrib/python/Automat/py3/automat/_methodical.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/python/Automat/py3/automat/_methodical.py b/contrib/python/Automat/py3/automat/_methodical.py
index 6c46c11e89e..e2ae8b3d159 100644
--- a/contrib/python/Automat/py3/automat/_methodical.py
+++ b/contrib/python/Automat/py3/automat/_methodical.py
@@ -60,6 +60,10 @@ def _getArgNames(spec):
The name of * and ** arguments is normalized to "*args" and "**kwargs".
+ Return type annotations are omitted, since we don't constrain input methods
+ to have the same return type as output methods, nor output methods to have
+ the same output type.
+
:param ArgSpec spec: A function to interrogate for a signature.
:return: The set of all argument names in `func`s signature.
:rtype: Set[str]
@@ -69,7 +73,7 @@ def _getArgNames(spec):
+ spec.kwonlyargs
+ (("*args",) if spec.varargs else ())
+ (("**kwargs",) if spec.varkw else ())
- + spec.annotations
+ + tuple(a for a in spec.annotations if a[0] != "return")
)