From 083174332b98a962220249a6ae895621963237f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damien=20Nad=C3=A9?= Date: Sun, 10 Dec 2023 16:28:48 +0100 Subject: [PATCH] Update all test known-working files --- ...oretry_built_by_call_async_args_any_any.py | 30 ------------------- ...oretry_built_by_call_async_args_any_str.py | 30 ------------------- ...oretry_built_by_call_async_args_int_any.py | 30 ------------------- ...oretry_built_by_call_async_args_int_str.py | 11 +++---- ...etry_built_by_call_async_kwargs_any_any.py | 30 ------------------- ...etry_built_by_call_async_kwargs_any_str.py | 30 ------------------- ...etry_built_by_call_async_kwargs_int_any.py | 30 ------------------- ...etry_built_by_call_async_kwargs_int_str.py | 11 +++---- ...retry_built_by_call_async_param_any_any.py | 30 ------------------- ...retry_built_by_call_async_param_any_str.py | 30 ------------------- ...retry_built_by_call_async_param_int_any.py | 30 ------------------- ...retry_built_by_call_async_param_int_str.py | 11 +++---- ...ioretry_built_by_call_sync_args_any_any.py | 11 +++---- ...ioretry_built_by_call_sync_args_any_str.py | 27 +++++++++++++++++ ...ioretry_built_by_call_sync_args_int_any.py | 11 +++---- ...ioretry_built_by_call_sync_args_int_str.py | 27 +++++++++++++++++ ...retry_built_by_call_sync_kwargs_any_any.py | 11 +++---- ...retry_built_by_call_sync_kwargs_any_str.py | 27 +++++++++++++++++ ...retry_built_by_call_sync_kwargs_int_any.py | 11 +++---- ...retry_built_by_call_sync_kwargs_int_str.py | 27 +++++++++++++++++ ...oretry_built_by_call_sync_param_any_any.py | 11 +++---- ...oretry_built_by_call_sync_param_any_str.py | 27 +++++++++++++++++ ...oretry_built_by_call_sync_param_int_any.py | 11 +++---- ...oretry_built_by_call_sync_param_int_str.py | 27 +++++++++++++++++ ...ioretry_built_direct_async_args_int_str.py | 6 ++-- ...retry_built_direct_async_kwargs_int_str.py | 6 ++-- ...oretry_built_direct_async_param_int_str.py | 6 ++-- ...aioretry_built_direct_sync_args_any_any.py | 6 ++-- ...aioretry_built_direct_sync_args_any_str.py | 6 ++-- ...aioretry_built_direct_sync_args_int_any.py | 6 ++-- ...aioretry_built_direct_sync_args_int_str.py | 6 ++-- ...oretry_built_direct_sync_kwargs_any_any.py | 6 ++-- ...oretry_built_direct_sync_kwargs_any_str.py | 6 ++-- ...oretry_built_direct_sync_kwargs_int_any.py | 6 ++-- ...oretry_built_direct_sync_kwargs_int_str.py | 6 ++-- ...ioretry_built_direct_sync_param_any_any.py | 6 ++-- ...ioretry_built_direct_sync_param_any_str.py | 6 ++-- ...ioretry_built_direct_sync_param_int_any.py | 6 ++-- ...ioretry_built_direct_sync_param_int_str.py | 6 ++-- ..._main_by_call_named_async_args_any_any.py} | 12 ++++---- ..._main_by_call_named_async_args_any_str.py} | 12 ++++---- ..._main_by_call_named_async_args_int_any.py} | 12 ++++---- ..._main_by_call_named_async_args_int_str.py} | 12 ++++---- ...ain_by_call_named_async_kwargs_any_any.py} | 12 ++++---- ...ain_by_call_named_async_kwargs_any_str.py} | 12 ++++---- ...ain_by_call_named_async_kwargs_int_any.py} | 12 ++++---- ...ain_by_call_named_async_kwargs_int_str.py} | 12 ++++---- ...main_by_call_named_async_param_any_any.py} | 12 ++++---- ...main_by_call_named_async_param_any_str.py} | 12 ++++---- ...main_by_call_named_async_param_int_any.py} | 12 ++++---- ...main_by_call_named_async_param_int_str.py} | 12 ++++---- ...y_main_by_call_named_sync_args_any_any.py} | 12 ++++---- ...y_main_by_call_named_sync_args_int_any.py} | 12 ++++---- ...main_by_call_named_sync_kwargs_any_any.py} | 12 ++++---- ...main_by_call_named_sync_kwargs_int_any.py} | 12 ++++---- ..._main_by_call_named_sync_param_any_any.py} | 12 ++++---- ..._main_by_call_named_sync_param_int_any.py} | 12 ++++---- ...main_by_call_unnamed_async_args_any_any.py | 10 +++---- ...main_by_call_unnamed_async_args_any_str.py | 10 +++---- ...main_by_call_unnamed_async_args_int_any.py | 10 +++---- ...main_by_call_unnamed_async_args_int_str.py | 10 +++---- ...in_by_call_unnamed_async_kwargs_any_any.py | 10 +++---- ...in_by_call_unnamed_async_kwargs_any_str.py | 10 +++---- ...in_by_call_unnamed_async_kwargs_int_any.py | 10 +++---- ...in_by_call_unnamed_async_kwargs_int_str.py | 10 +++---- ...ain_by_call_unnamed_async_param_any_any.py | 10 +++---- ...ain_by_call_unnamed_async_param_any_str.py | 10 +++---- ...ain_by_call_unnamed_async_param_int_any.py | 10 +++---- ...ain_by_call_unnamed_async_param_int_str.py | 10 +++---- ..._main_by_call_unnamed_sync_args_any_any.py | 10 +++---- ..._main_by_call_unnamed_sync_args_int_any.py | 10 +++---- ...ain_by_call_unnamed_sync_kwargs_any_any.py | 10 +++---- ...ain_by_call_unnamed_sync_kwargs_int_any.py | 10 +++---- ...main_by_call_unnamed_sync_param_any_any.py | 10 +++---- ...main_by_call_unnamed_sync_param_int_any.py | 10 +++---- ...y_main_direct_named_async_args_any_any.py} | 4 +-- ...y_main_direct_named_async_args_any_str.py} | 4 +-- ...y_main_direct_named_async_args_int_any.py} | 4 +-- ...y_main_direct_named_async_args_int_str.py} | 4 +-- ...main_direct_named_async_kwargs_any_any.py} | 4 +-- ...main_direct_named_async_kwargs_any_str.py} | 4 +-- ...main_direct_named_async_kwargs_int_any.py} | 4 +-- ...main_direct_named_async_kwargs_int_str.py} | 4 +-- ..._main_direct_named_async_param_any_any.py} | 4 +-- ..._main_direct_named_async_param_any_str.py} | 4 +-- ..._main_direct_named_async_param_int_any.py} | 4 +-- ..._main_direct_named_async_param_int_str.py} | 4 +-- ...ry_main_direct_named_sync_args_any_any.py} | 4 +-- ...ry_main_direct_named_sync_args_int_any.py} | 4 +-- ..._main_direct_named_sync_kwargs_any_any.py} | 4 +-- ..._main_direct_named_sync_kwargs_int_any.py} | 4 +-- ...y_main_direct_named_sync_param_any_any.py} | 4 +-- ...y_main_direct_named_sync_param_int_any.py} | 4 +-- ..._main_direct_unnamed_async_args_any_any.py | 2 +- ..._main_direct_unnamed_async_args_any_str.py | 2 +- ..._main_direct_unnamed_async_args_int_any.py | 2 +- ..._main_direct_unnamed_async_args_int_str.py | 2 +- ...ain_direct_unnamed_async_kwargs_any_any.py | 2 +- ...ain_direct_unnamed_async_kwargs_any_str.py | 2 +- ...ain_direct_unnamed_async_kwargs_int_any.py | 2 +- ...ain_direct_unnamed_async_kwargs_int_str.py | 2 +- ...main_direct_unnamed_async_param_any_any.py | 2 +- ...main_direct_unnamed_async_param_any_str.py | 2 +- ...main_direct_unnamed_async_param_int_any.py | 2 +- ...main_direct_unnamed_async_param_int_str.py | 2 +- ...y_main_direct_unnamed_sync_args_any_any.py | 2 +- ...y_main_direct_unnamed_sync_args_int_any.py | 2 +- ...main_direct_unnamed_sync_kwargs_any_any.py | 2 +- ...main_direct_unnamed_sync_kwargs_int_any.py | 2 +- ..._main_direct_unnamed_sync_param_any_any.py | 2 +- ..._main_direct_unnamed_sync_param_int_any.py | 2 +- .../retry_built_by_call_sync_args_any_any.py | 11 +++---- .../retry_built_by_call_sync_args_any_str.py | 11 +++---- .../retry_built_by_call_sync_args_int_any.py | 11 +++---- .../retry_built_by_call_sync_args_int_str.py | 11 +++---- ...retry_built_by_call_sync_kwargs_any_any.py | 11 +++---- ...retry_built_by_call_sync_kwargs_any_str.py | 11 +++---- ...retry_built_by_call_sync_kwargs_int_any.py | 11 +++---- ...retry_built_by_call_sync_kwargs_int_str.py | 11 +++---- .../retry_built_by_call_sync_param_any_any.py | 11 +++---- .../retry_built_by_call_sync_param_any_str.py | 11 +++---- .../retry_built_by_call_sync_param_int_any.py | 11 +++---- .../retry_built_by_call_sync_param_int_str.py | 11 +++---- .../retry_built_direct_sync_args_any_any.py | 6 ++-- .../retry_built_direct_sync_args_any_str.py | 6 ++-- .../retry_built_direct_sync_args_int_any.py | 6 ++-- .../retry_built_direct_sync_args_int_str.py | 6 ++-- .../retry_built_direct_sync_kwargs_any_any.py | 6 ++-- .../retry_built_direct_sync_kwargs_any_str.py | 6 ++-- .../retry_built_direct_sync_kwargs_int_any.py | 6 ++-- .../retry_built_direct_sync_kwargs_int_str.py | 6 ++-- .../retry_built_direct_sync_param_any_any.py | 6 ++-- .../retry_built_direct_sync_param_any_str.py | 6 ++-- .../retry_built_direct_sync_param_int_any.py | 6 ++-- .../retry_built_direct_sync_param_int_str.py | 6 ++-- ...y_main_by_call_named_sync_args_any_any.py} | 12 ++++---- ...y_main_by_call_named_sync_args_any_str.py} | 12 ++++---- ...y_main_by_call_named_sync_args_int_any.py} | 12 ++++---- ...y_main_by_call_named_sync_args_int_str.py} | 12 ++++---- ...main_by_call_named_sync_kwargs_any_any.py} | 12 ++++---- ...main_by_call_named_sync_kwargs_any_str.py} | 12 ++++---- ...main_by_call_named_sync_kwargs_int_any.py} | 12 ++++---- ...main_by_call_named_sync_kwargs_int_str.py} | 12 ++++---- ..._main_by_call_named_sync_param_any_any.py} | 12 ++++---- ..._main_by_call_named_sync_param_any_str.py} | 12 ++++---- ..._main_by_call_named_sync_param_int_any.py} | 12 ++++---- ..._main_by_call_named_sync_param_int_str.py} | 12 ++++---- ..._main_by_call_unnamed_sync_args_any_any.py | 10 +++---- ..._main_by_call_unnamed_sync_args_any_str.py | 10 +++---- ..._main_by_call_unnamed_sync_args_int_any.py | 10 +++---- ..._main_by_call_unnamed_sync_args_int_str.py | 10 +++---- ...ain_by_call_unnamed_sync_kwargs_any_any.py | 10 +++---- ...ain_by_call_unnamed_sync_kwargs_any_str.py | 10 +++---- ...ain_by_call_unnamed_sync_kwargs_int_any.py | 10 +++---- ...ain_by_call_unnamed_sync_kwargs_int_str.py | 10 +++---- ...main_by_call_unnamed_sync_param_any_any.py | 10 +++---- ...main_by_call_unnamed_sync_param_any_str.py | 10 +++---- ...main_by_call_unnamed_sync_param_int_any.py | 10 +++---- ...main_by_call_unnamed_sync_param_int_str.py | 10 +++---- ...ry_main_direct_named_sync_args_any_any.py} | 4 +-- ...ry_main_direct_named_sync_args_any_str.py} | 4 +-- ...ry_main_direct_named_sync_args_int_any.py} | 4 +-- ...ry_main_direct_named_sync_args_int_str.py} | 4 +-- ..._main_direct_named_sync_kwargs_any_any.py} | 4 +-- ..._main_direct_named_sync_kwargs_any_str.py} | 4 +-- ..._main_direct_named_sync_kwargs_int_any.py} | 4 +-- ..._main_direct_named_sync_kwargs_int_str.py} | 4 +-- ...y_main_direct_named_sync_param_any_any.py} | 4 +-- ...y_main_direct_named_sync_param_any_str.py} | 4 +-- ...y_main_direct_named_sync_param_int_any.py} | 4 +-- ...y_main_direct_named_sync_param_int_str.py} | 4 +-- ...y_main_direct_unnamed_sync_args_any_any.py | 2 +- ...y_main_direct_unnamed_sync_args_any_str.py | 2 +- ...y_main_direct_unnamed_sync_args_int_any.py | 2 +- ...y_main_direct_unnamed_sync_args_int_str.py | 2 +- ...main_direct_unnamed_sync_kwargs_any_any.py | 2 +- ...main_direct_unnamed_sync_kwargs_any_str.py | 2 +- ...main_direct_unnamed_sync_kwargs_int_any.py | 2 +- ...main_direct_unnamed_sync_kwargs_int_str.py | 2 +- ..._main_direct_unnamed_sync_param_any_any.py | 2 +- ..._main_direct_unnamed_sync_param_any_str.py | 2 +- ..._main_direct_unnamed_sync_param_int_any.py | 2 +- ..._main_direct_unnamed_sync_param_int_str.py | 2 +- 183 files changed, 660 insertions(+), 1005 deletions(-) delete mode 100644 test/static_analysis/aioretry_built_by_call_async_args_any_any.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_args_any_str.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_args_int_any.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_kwargs_any_any.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_kwargs_any_str.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_kwargs_int_any.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_param_any_any.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_param_any_str.py delete mode 100644 test/static_analysis/aioretry_built_by_call_async_param_int_any.py create mode 100644 test/static_analysis/aioretry_built_by_call_sync_args_any_str.py create mode 100644 test/static_analysis/aioretry_built_by_call_sync_args_int_str.py create mode 100644 test/static_analysis/aioretry_built_by_call_sync_kwargs_any_str.py create mode 100644 test/static_analysis/aioretry_built_by_call_sync_kwargs_int_str.py create mode 100644 test/static_analysis/aioretry_built_by_call_sync_param_any_str.py create mode 100644 test/static_analysis/aioretry_built_by_call_sync_param_int_str.py rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_args_any_any.py => aioretry_main_by_call_named_async_args_any_any.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_args_any_str.py => aioretry_main_by_call_named_async_args_any_str.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_args_int_any.py => aioretry_main_by_call_named_async_args_int_any.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_args_int_str.py => aioretry_main_by_call_named_async_args_int_str.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_kwargs_any_any.py => aioretry_main_by_call_named_async_kwargs_any_any.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_kwargs_any_str.py => aioretry_main_by_call_named_async_kwargs_any_str.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_kwargs_int_any.py => aioretry_main_by_call_named_async_kwargs_int_any.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_kwargs_int_str.py => aioretry_main_by_call_named_async_kwargs_int_str.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_param_any_any.py => aioretry_main_by_call_named_async_param_any_any.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_param_any_str.py => aioretry_main_by_call_named_async_param_any_str.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_param_int_any.py => aioretry_main_by_call_named_async_param_int_any.py} (66%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_async_param_int_str.py => aioretry_main_by_call_named_async_param_int_str.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_args_any_any.py => aioretry_main_by_call_named_sync_args_any_any.py} (68%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_args_int_any.py => aioretry_main_by_call_named_sync_args_int_any.py} (68%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_kwargs_any_any.py => aioretry_main_by_call_named_sync_kwargs_any_any.py} (67%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_kwargs_int_any.py => aioretry_main_by_call_named_sync_kwargs_int_any.py} (67%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_param_any_any.py => aioretry_main_by_call_named_sync_param_any_any.py} (68%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_param_int_any.py => aioretry_main_by_call_named_sync_param_int_any.py} (68%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_args_any_any.py => aioretry_main_direct_named_async_args_any_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_args_any_str.py => aioretry_main_direct_named_async_args_any_str.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_args_int_any.py => aioretry_main_direct_named_async_args_int_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_args_int_str.py => aioretry_main_direct_named_async_args_int_str.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_kwargs_any_any.py => aioretry_main_direct_named_async_kwargs_any_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_kwargs_any_str.py => aioretry_main_direct_named_async_kwargs_any_str.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_kwargs_int_any.py => aioretry_main_direct_named_async_kwargs_int_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_kwargs_int_str.py => aioretry_main_direct_named_async_kwargs_int_str.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_param_any_any.py => aioretry_main_direct_named_async_param_any_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_param_any_str.py => aioretry_main_direct_named_async_param_any_str.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_param_int_any.py => aioretry_main_direct_named_async_param_int_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_async_param_int_str.py => aioretry_main_direct_named_async_param_int_str.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_sync_args_any_any.py => aioretry_main_direct_named_sync_args_any_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_sync_args_int_any.py => aioretry_main_direct_named_sync_args_int_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_sync_kwargs_any_any.py => aioretry_main_direct_named_sync_kwargs_any_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_sync_kwargs_int_any.py => aioretry_main_direct_named_sync_kwargs_int_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_sync_param_any_any.py => aioretry_main_direct_named_sync_param_any_any.py} (81%) rename test/static_analysis/{aioretry_main_direct_unnamed_named_sync_param_int_any.py => aioretry_main_direct_named_sync_param_int_any.py} (81%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_sync_args_any_any.py => retry_main_by_call_named_sync_args_any_any.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_args_any_str.py => retry_main_by_call_named_sync_args_any_str.py} (68%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_sync_args_int_any.py => retry_main_by_call_named_sync_args_int_any.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_args_int_str.py => retry_main_by_call_named_sync_args_int_str.py} (68%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_sync_kwargs_any_any.py => retry_main_by_call_named_sync_kwargs_any_any.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_kwargs_any_str.py => retry_main_by_call_named_sync_kwargs_any_str.py} (67%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_sync_kwargs_int_any.py => retry_main_by_call_named_sync_kwargs_int_any.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_kwargs_int_str.py => retry_main_by_call_named_sync_kwargs_int_str.py} (67%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_sync_param_any_any.py => retry_main_by_call_named_sync_param_any_any.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_param_any_str.py => retry_main_by_call_named_sync_param_any_str.py} (68%) rename test/static_analysis/{aioretry_main_by_call_unnamed_named_sync_param_int_any.py => retry_main_by_call_named_sync_param_int_any.py} (66%) rename test/static_analysis/{retry_main_by_call_unnamed_named_sync_param_int_str.py => retry_main_by_call_named_sync_param_int_str.py} (68%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_args_any_any.py => retry_main_direct_named_sync_args_any_any.py} (82%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_args_any_str.py => retry_main_direct_named_sync_args_any_str.py} (82%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_args_int_any.py => retry_main_direct_named_sync_args_int_any.py} (82%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_args_int_str.py => retry_main_direct_named_sync_args_int_str.py} (82%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_kwargs_any_any.py => retry_main_direct_named_sync_kwargs_any_any.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_kwargs_any_str.py => retry_main_direct_named_sync_kwargs_any_str.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_kwargs_int_any.py => retry_main_direct_named_sync_kwargs_int_any.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_kwargs_int_str.py => retry_main_direct_named_sync_kwargs_int_str.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_param_any_any.py => retry_main_direct_named_sync_param_any_any.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_param_any_str.py => retry_main_direct_named_sync_param_any_str.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_param_int_any.py => retry_main_direct_named_sync_param_int_any.py} (81%) rename test/static_analysis/{retry_main_direct_unnamed_named_sync_param_int_str.py => retry_main_direct_named_sync_param_int_str.py} (81%) diff --git a/test/static_analysis/aioretry_built_by_call_async_args_any_any.py b/test/static_analysis/aioretry_built_by_call_async_args_any_any.py deleted file mode 100644 index ac38a08..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_args_any_any.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_args_any_any.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(*args: Any) -> Any: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(1, 2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_args_any_str.py b/test/static_analysis/aioretry_built_by_call_async_args_any_str.py deleted file mode 100644 index 4f4ad32..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_args_any_str.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_args_any_str.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(*args: Any) -> str: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(1, 2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_args_int_any.py b/test/static_analysis/aioretry_built_by_call_async_args_int_any.py deleted file mode 100644 index db1c461..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_args_int_any.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_args_int_any.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(*args: int) -> Any: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(1, 2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_args_int_str.py b/test/static_analysis/aioretry_built_by_call_async_args_int_str.py index c266719..017315f 100644 --- a/test/static_analysis/aioretry_built_by_call_async_args_int_str.py +++ b/test/static_analysis/aioretry_built_by_call_async_args_int_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - async def func(*args: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_async_kwargs_any_any.py b/test/static_analysis/aioretry_built_by_call_async_kwargs_any_any.py deleted file mode 100644 index f22f5e5..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_kwargs_any_any.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_kwargs_any_any.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(**kwargs: Any) -> Any: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(x=1, y=2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_kwargs_any_str.py b/test/static_analysis/aioretry_built_by_call_async_kwargs_any_str.py deleted file mode 100644 index 3d32931..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_kwargs_any_str.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_kwargs_any_str.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(**kwargs: Any) -> str: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(x=1, y=2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_kwargs_int_any.py b/test/static_analysis/aioretry_built_by_call_async_kwargs_int_any.py deleted file mode 100644 index 8fd9b25..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_kwargs_int_any.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_kwargs_int_any.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(**kwargs: int) -> Any: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(x=1, y=2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_kwargs_int_str.py b/test/static_analysis/aioretry_built_by_call_async_kwargs_int_str.py index a9c3654..99bf2c2 100644 --- a/test/static_analysis/aioretry_built_by_call_async_kwargs_int_str.py +++ b/test/static_analysis/aioretry_built_by_call_async_kwargs_int_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - async def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_async_param_any_any.py b/test/static_analysis/aioretry_built_by_call_async_param_any_any.py deleted file mode 100644 index 019f20f..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_param_any_any.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_param_any_any.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(x: Any, y: Any) -> Any: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(1, 2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_param_any_str.py b/test/static_analysis/aioretry_built_by_call_async_param_any_str.py deleted file mode 100644 index b8aea42..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_param_any_str.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_param_any_str.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(x: Any, y: Any) -> str: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(1, 2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_param_int_any.py b/test/static_analysis/aioretry_built_by_call_async_param_int_any.py deleted file mode 100644 index 4224cba..0000000 --- a/test/static_analysis/aioretry_built_by_call_async_param_int_any.py +++ /dev/null @@ -1,30 +0,0 @@ -'''Test aioretry_built_by_call_async_param_int_any.py ''' - -# pylint: disable=unused-import, unused-argument, invalid-name, R0801 - - -import asyncio -from typing import Any - -from kaioretry import Retry, Context - - -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - -async def func(x: int, y: int) -> Any: - ''' ... ''' - return 'return_value' -func = aioretry_decorator(func) - - -async def use_decoration(parameter: str) -> str: - ''' obtain result and use it ''' - result = await func(1, 2) - assert isinstance(result, str) - return f"parameter is {parameter}. result is {result}" - - -if __name__ == "__main__": - print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_async_param_int_str.py b/test/static_analysis/aioretry_built_by_call_async_param_int_str.py index 27e35d9..03e8128 100644 --- a/test/static_analysis/aioretry_built_by_call_async_param_int_str.py +++ b/test/static_analysis/aioretry_built_by_call_async_param_int_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - async def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_args_any_any.py b/test/static_analysis/aioretry_built_by_call_sync_args_any_any.py index a04c324..90f1bc0 100644 --- a/test/static_analysis/aioretry_built_by_call_sync_args_any_any.py +++ b/test/static_analysis/aioretry_built_by_call_sync_args_any_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_args_any_str.py b/test/static_analysis/aioretry_built_by_call_sync_args_any_str.py new file mode 100644 index 0000000..fb3a257 --- /dev/null +++ b/test/static_analysis/aioretry_built_by_call_sync_args_any_str.py @@ -0,0 +1,27 @@ +'''Test aioretry_built_by_call_sync_args_any_str.py ''' + +# pylint: disable=unused-import, unused-argument, invalid-name, R0801 + + +import asyncio +from typing import Any + +from kaioretry import retry, aioretry, Retry, Context + + +def func(*args: Any) -> str: + ''' ... ''' + return 'return_value' + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) + + +async def use_decoration(parameter: str) -> str: + ''' obtain result and use it ''' + result = await wrapped(1, 2) + assert isinstance(result, str) + return f"parameter is {parameter}. result is {result}" + + +if __name__ == "__main__": + print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_sync_args_int_any.py b/test/static_analysis/aioretry_built_by_call_sync_args_int_any.py index a46033f..dfbe03e 100644 --- a/test/static_analysis/aioretry_built_by_call_sync_args_int_any.py +++ b/test/static_analysis/aioretry_built_by_call_sync_args_int_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_args_int_str.py b/test/static_analysis/aioretry_built_by_call_sync_args_int_str.py new file mode 100644 index 0000000..3679d40 --- /dev/null +++ b/test/static_analysis/aioretry_built_by_call_sync_args_int_str.py @@ -0,0 +1,27 @@ +'''Test aioretry_built_by_call_sync_args_int_str.py ''' + +# pylint: disable=unused-import, unused-argument, invalid-name, R0801 + + +import asyncio +from typing import Any + +from kaioretry import retry, aioretry, Retry, Context + + +def func(*args: int) -> str: + ''' ... ''' + return 'return_value' + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) + + +async def use_decoration(parameter: str) -> str: + ''' obtain result and use it ''' + result = await wrapped(1, 2) + assert isinstance(result, str) + return f"parameter is {parameter}. result is {result}" + + +if __name__ == "__main__": + print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_any.py b/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_any.py index 8b2befa..34a996f 100644 --- a/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_any.py +++ b/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_str.py b/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_str.py new file mode 100644 index 0000000..17c60e3 --- /dev/null +++ b/test/static_analysis/aioretry_built_by_call_sync_kwargs_any_str.py @@ -0,0 +1,27 @@ +'''Test aioretry_built_by_call_sync_kwargs_any_str.py ''' + +# pylint: disable=unused-import, unused-argument, invalid-name, R0801 + + +import asyncio +from typing import Any + +from kaioretry import retry, aioretry, Retry, Context + + +def func(**kwargs: Any) -> str: + ''' ... ''' + return 'return_value' + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) + + +async def use_decoration(parameter: str) -> str: + ''' obtain result and use it ''' + result = await wrapped(x=1, y=2) + assert isinstance(result, str) + return f"parameter is {parameter}. result is {result}" + + +if __name__ == "__main__": + print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_any.py b/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_any.py index b032e39..5759210 100644 --- a/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_any.py +++ b/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_str.py b/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_str.py new file mode 100644 index 0000000..1266496 --- /dev/null +++ b/test/static_analysis/aioretry_built_by_call_sync_kwargs_int_str.py @@ -0,0 +1,27 @@ +'''Test aioretry_built_by_call_sync_kwargs_int_str.py ''' + +# pylint: disable=unused-import, unused-argument, invalid-name, R0801 + + +import asyncio +from typing import Any + +from kaioretry import retry, aioretry, Retry, Context + + +def func(**kwargs: int) -> str: + ''' ... ''' + return 'return_value' + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) + + +async def use_decoration(parameter: str) -> str: + ''' obtain result and use it ''' + result = await wrapped(x=1, y=2) + assert isinstance(result, str) + return f"parameter is {parameter}. result is {result}" + + +if __name__ == "__main__": + print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_sync_param_any_any.py b/test/static_analysis/aioretry_built_by_call_sync_param_any_any.py index e926450..2c3e032 100644 --- a/test/static_analysis/aioretry_built_by_call_sync_param_any_any.py +++ b/test/static_analysis/aioretry_built_by_call_sync_param_any_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_param_any_str.py b/test/static_analysis/aioretry_built_by_call_sync_param_any_str.py new file mode 100644 index 0000000..91edf87 --- /dev/null +++ b/test/static_analysis/aioretry_built_by_call_sync_param_any_str.py @@ -0,0 +1,27 @@ +'''Test aioretry_built_by_call_sync_param_any_str.py ''' + +# pylint: disable=unused-import, unused-argument, invalid-name, R0801 + + +import asyncio +from typing import Any + +from kaioretry import retry, aioretry, Retry, Context + + +def func(x: Any, y: Any) -> str: + ''' ... ''' + return 'return_value' + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) + + +async def use_decoration(parameter: str) -> str: + ''' obtain result and use it ''' + result = await wrapped(1, 2) + assert isinstance(result, str) + return f"parameter is {parameter}. result is {result}" + + +if __name__ == "__main__": + print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_by_call_sync_param_int_any.py b/test/static_analysis/aioretry_built_by_call_sync_param_int_any.py index e7ec367..1b54647 100644 --- a/test/static_analysis/aioretry_built_by_call_sync_param_int_any.py +++ b/test/static_analysis/aioretry_built_by_call_sync_param_int_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry - def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_built_by_call_sync_param_int_str.py b/test/static_analysis/aioretry_built_by_call_sync_param_int_str.py new file mode 100644 index 0000000..aa17f3d --- /dev/null +++ b/test/static_analysis/aioretry_built_by_call_sync_param_int_str.py @@ -0,0 +1,27 @@ +'''Test aioretry_built_by_call_sync_param_int_str.py ''' + +# pylint: disable=unused-import, unused-argument, invalid-name, R0801 + + +import asyncio +from typing import Any + +from kaioretry import retry, aioretry, Retry, Context + + +def func(x: int, y: int) -> str: + ''' ... ''' + return 'return_value' + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry(func) + + +async def use_decoration(parameter: str) -> str: + ''' obtain result and use it ''' + result = await wrapped(1, 2) + assert isinstance(result, str) + return f"parameter is {parameter}. result is {result}" + + +if __name__ == "__main__": + print(asyncio.run(use_decoration("value"))) diff --git a/test/static_analysis/aioretry_built_direct_async_args_int_str.py b/test/static_analysis/aioretry_built_direct_async_args_int_str.py index 8dcd8b7..caf57b0 100644 --- a/test/static_analysis/aioretry_built_direct_async_args_int_str.py +++ b/test/static_analysis/aioretry_built_direct_async_args_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry async def func(*args: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_async_kwargs_int_str.py b/test/static_analysis/aioretry_built_direct_async_kwargs_int_str.py index 90d71e6..22a6242 100644 --- a/test/static_analysis/aioretry_built_direct_async_kwargs_int_str.py +++ b/test/static_analysis/aioretry_built_direct_async_kwargs_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry async def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_async_param_int_str.py b/test/static_analysis/aioretry_built_direct_async_param_int_str.py index 6de6165..701df27 100644 --- a/test/static_analysis/aioretry_built_direct_async_param_int_str.py +++ b/test/static_analysis/aioretry_built_direct_async_param_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry async def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_args_any_any.py b/test/static_analysis/aioretry_built_direct_sync_args_any_any.py index bd2d501..0b7723e 100644 --- a/test/static_analysis/aioretry_built_direct_sync_args_any_any.py +++ b/test/static_analysis/aioretry_built_direct_sync_args_any_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(*args: Any) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_args_any_str.py b/test/static_analysis/aioretry_built_direct_sync_args_any_str.py index 544f5c5..c2a137e 100644 --- a/test/static_analysis/aioretry_built_direct_sync_args_any_str.py +++ b/test/static_analysis/aioretry_built_direct_sync_args_any_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(*args: Any) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_args_int_any.py b/test/static_analysis/aioretry_built_direct_sync_args_int_any.py index 4d40ce8..74fd360 100644 --- a/test/static_analysis/aioretry_built_direct_sync_args_int_any.py +++ b/test/static_analysis/aioretry_built_direct_sync_args_int_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(*args: int) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_args_int_str.py b/test/static_analysis/aioretry_built_direct_sync_args_int_str.py index 3e347f8..aa8b0fe 100644 --- a/test/static_analysis/aioretry_built_direct_sync_args_int_str.py +++ b/test/static_analysis/aioretry_built_direct_sync_args_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(*args: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_kwargs_any_any.py b/test/static_analysis/aioretry_built_direct_sync_kwargs_any_any.py index ae6c0f7..39b7df9 100644 --- a/test/static_analysis/aioretry_built_direct_sync_kwargs_any_any.py +++ b/test/static_analysis/aioretry_built_direct_sync_kwargs_any_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_kwargs_any_str.py b/test/static_analysis/aioretry_built_direct_sync_kwargs_any_str.py index ada470d..41f9fe0 100644 --- a/test/static_analysis/aioretry_built_direct_sync_kwargs_any_str.py +++ b/test/static_analysis/aioretry_built_direct_sync_kwargs_any_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_kwargs_int_any.py b/test/static_analysis/aioretry_built_direct_sync_kwargs_int_any.py index 35d5225..7f3d353 100644 --- a/test/static_analysis/aioretry_built_direct_sync_kwargs_int_any.py +++ b/test/static_analysis/aioretry_built_direct_sync_kwargs_int_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_kwargs_int_str.py b/test/static_analysis/aioretry_built_direct_sync_kwargs_int_str.py index 211afc9..347bad3 100644 --- a/test/static_analysis/aioretry_built_direct_sync_kwargs_int_str.py +++ b/test/static_analysis/aioretry_built_direct_sync_kwargs_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_param_any_any.py b/test/static_analysis/aioretry_built_direct_sync_param_any_any.py index c68067d..ee3aa46 100644 --- a/test/static_analysis/aioretry_built_direct_sync_param_any_any.py +++ b/test/static_analysis/aioretry_built_direct_sync_param_any_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_param_any_str.py b/test/static_analysis/aioretry_built_direct_sync_param_any_str.py index 1737f88..ae20e0c 100644 --- a/test/static_analysis/aioretry_built_direct_sync_param_any_str.py +++ b/test/static_analysis/aioretry_built_direct_sync_param_any_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_param_int_any.py b/test/static_analysis/aioretry_built_direct_sync_param_int_any.py index 042dc8f..b689cc8 100644 --- a/test/static_analysis/aioretry_built_direct_sync_param_int_any.py +++ b/test/static_analysis/aioretry_built_direct_sync_param_int_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_built_direct_sync_param_int_str.py b/test/static_analysis/aioretry_built_direct_sync_param_int_str.py index c65d9f0..1f9d168 100644 --- a/test/static_analysis/aioretry_built_direct_sync_param_int_str.py +++ b/test/static_analysis/aioretry_built_direct_sync_param_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).aioretry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).aioretry def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_any_any.py b/test/static_analysis/aioretry_main_by_call_named_async_args_any_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_any_any.py rename to test/static_analysis/aioretry_main_by_call_named_async_args_any_any.py index 02dde72..69fa02a 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_args_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_args_any_any.py ''' +'''Test aioretry_main_by_call_named_async_args_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_any_str.py b/test/static_analysis/aioretry_main_by_call_named_async_args_any_str.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_any_str.py rename to test/static_analysis/aioretry_main_by_call_named_async_args_any_str.py index 92ad5d3..261147f 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_any_str.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_args_any_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_args_any_str.py ''' +'''Test aioretry_main_by_call_named_async_args_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_int_any.py b/test/static_analysis/aioretry_main_by_call_named_async_args_int_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_int_any.py rename to test/static_analysis/aioretry_main_by_call_named_async_args_int_any.py index fdd4c10..52e0e9c 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_args_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_args_int_any.py ''' +'''Test aioretry_main_by_call_named_async_args_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_int_str.py b/test/static_analysis/aioretry_main_by_call_named_async_args_int_str.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_int_str.py rename to test/static_analysis/aioretry_main_by_call_named_async_args_int_str.py index e758ac5..04693ae 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_args_int_str.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_args_int_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_args_int_str.py ''' +'''Test aioretry_main_by_call_named_async_args_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_any_any.py b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_any_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_any_any.py rename to test/static_analysis/aioretry_main_by_call_named_async_kwargs_any_any.py index 09e3188..bf3c15c 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_kwargs_any_any.py ''' +'''Test aioretry_main_by_call_named_async_kwargs_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_any_str.py b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_any_str.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_any_str.py rename to test/static_analysis/aioretry_main_by_call_named_async_kwargs_any_str.py index b7874d3..0918e31 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_any_str.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_any_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_kwargs_any_str.py ''' +'''Test aioretry_main_by_call_named_async_kwargs_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_int_any.py b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_int_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_int_any.py rename to test/static_analysis/aioretry_main_by_call_named_async_kwargs_int_any.py index ee0b7f5..f984d58 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_kwargs_int_any.py ''' +'''Test aioretry_main_by_call_named_async_kwargs_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_int_str.py b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_int_str.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_int_str.py rename to test/static_analysis/aioretry_main_by_call_named_async_kwargs_int_str.py index 66b3640..d3767f6 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_kwargs_int_str.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_kwargs_int_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_kwargs_int_str.py ''' +'''Test aioretry_main_by_call_named_async_kwargs_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_any_any.py b/test/static_analysis/aioretry_main_by_call_named_async_param_any_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_any_any.py rename to test/static_analysis/aioretry_main_by_call_named_async_param_any_any.py index 6770793..833aabd 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_param_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_param_any_any.py ''' +'''Test aioretry_main_by_call_named_async_param_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_any_str.py b/test/static_analysis/aioretry_main_by_call_named_async_param_any_str.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_any_str.py rename to test/static_analysis/aioretry_main_by_call_named_async_param_any_str.py index 3006bff..6b4c247 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_any_str.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_param_any_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_param_any_str.py ''' +'''Test aioretry_main_by_call_named_async_param_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_int_any.py b/test/static_analysis/aioretry_main_by_call_named_async_param_int_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_int_any.py rename to test/static_analysis/aioretry_main_by_call_named_async_param_int_any.py index 98e5835..6db461c 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_param_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_param_int_any.py ''' +'''Test aioretry_main_by_call_named_async_param_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_int_str.py b/test/static_analysis/aioretry_main_by_call_named_async_param_int_str.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_int_str.py rename to test/static_analysis/aioretry_main_by_call_named_async_param_int_str.py index 7e94cbd..5fb346e 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_async_param_int_str.py +++ b/test/static_analysis/aioretry_main_by_call_named_async_param_int_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_async_param_int_str.py ''' +'''Test aioretry_main_by_call_named_async_param_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_any_any.py b/test/static_analysis/aioretry_main_by_call_named_sync_args_any_any.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_args_any_any.py rename to test/static_analysis/aioretry_main_by_call_named_sync_args_any_any.py index bf708f9..cafecaa 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_sync_args_any_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_args_any_any.py ''' +'''Test aioretry_main_by_call_named_sync_args_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_int_any.py b/test/static_analysis/aioretry_main_by_call_named_sync_args_int_any.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_args_int_any.py rename to test/static_analysis/aioretry_main_by_call_named_sync_args_int_any.py index 760d8f3..9b78fee 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_sync_args_int_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_args_int_any.py ''' +'''Test aioretry_main_by_call_named_sync_args_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_any_any.py b/test/static_analysis/aioretry_main_by_call_named_sync_kwargs_any_any.py similarity index 67% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_any_any.py rename to test/static_analysis/aioretry_main_by_call_named_sync_kwargs_any_any.py index bc5fdb9..e4cfc90 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_sync_kwargs_any_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_kwargs_any_any.py ''' +'''Test aioretry_main_by_call_named_sync_kwargs_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_int_any.py b/test/static_analysis/aioretry_main_by_call_named_sync_kwargs_int_any.py similarity index 67% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_int_any.py rename to test/static_analysis/aioretry_main_by_call_named_sync_kwargs_int_any.py index 9e71ba2..73b88a0 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_sync_kwargs_int_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_kwargs_int_any.py ''' +'''Test aioretry_main_by_call_named_sync_kwargs_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_any_any.py b/test/static_analysis/aioretry_main_by_call_named_sync_param_any_any.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_param_any_any.py rename to test/static_analysis/aioretry_main_by_call_named_sync_param_any_any.py index fa8b342..2aecbb7 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_sync_param_any_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_param_any_any.py ''' +'''Test aioretry_main_by_call_named_sync_param_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_int_any.py b/test/static_analysis/aioretry_main_by_call_named_sync_param_int_any.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_param_int_any.py rename to test/static_analysis/aioretry_main_by_call_named_sync_param_int_any.py index 6439e97..ff697a2 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_named_sync_param_int_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_param_int_any.py ''' +'''Test aioretry_main_by_call_named_sync_param_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_any.py index d85db05..3fee1ee 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_str.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_str.py index 1e69ba5..6bef6b3 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_str.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_any_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_any.py index 0523462..c180e1c 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_str.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_str.py index 471c9cf..1660d24 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_str.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_args_int_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(*args: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_any.py index 45a42b6..cd73645 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_str.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_str.py index f87760f..8a1d176 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_str.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_any_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_any.py index 2d95a5e..7fabe1b 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_str.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_str.py index 3c906cb..6d72ed1 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_str.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_kwargs_int_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_any.py index be2fcea..2f49eef 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_str.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_str.py index f3ad69b..c25bf91 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_str.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_any_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_any.py index a01480b..64909ab 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_str.py b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_str.py index 5c30499..8b5c4e5 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_str.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_async_param_int_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context async def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_any_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_any_any.py index c0bf231..84526f5 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_int_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_int_any.py index 5d8652f..e511c09 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_sync_args_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_any_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_any_any.py index 421db68..112fe81 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_int_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_int_any.py index 7556a51..dd66ec1 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_sync_kwargs_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = await wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_any_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_any_any.py index 0b9a929..1498fc5 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_any_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_int_any.py b/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_int_any.py index b89873d..47b6bd8 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_int_any.py +++ b/test/static_analysis/aioretry_main_by_call_unnamed_sync_param_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = aioretry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = await wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_any_any.py b/test/static_analysis/aioretry_main_direct_named_async_args_any_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_args_any_any.py rename to test/static_analysis/aioretry_main_direct_named_async_args_any_any.py index da1925d..976b215 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_any_any.py +++ b/test/static_analysis/aioretry_main_direct_named_async_args_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_args_any_any.py ''' +'''Test aioretry_main_direct_named_async_args_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_any_str.py b/test/static_analysis/aioretry_main_direct_named_async_args_any_str.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_args_any_str.py rename to test/static_analysis/aioretry_main_direct_named_async_args_any_str.py index 0195497..664f23f 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_any_str.py +++ b/test/static_analysis/aioretry_main_direct_named_async_args_any_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_args_any_str.py ''' +'''Test aioretry_main_direct_named_async_args_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_int_any.py b/test/static_analysis/aioretry_main_direct_named_async_args_int_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_args_int_any.py rename to test/static_analysis/aioretry_main_direct_named_async_args_int_any.py index 251cb71..3291e5f 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_int_any.py +++ b/test/static_analysis/aioretry_main_direct_named_async_args_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_args_int_any.py ''' +'''Test aioretry_main_direct_named_async_args_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_int_str.py b/test/static_analysis/aioretry_main_direct_named_async_args_int_str.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_args_int_str.py rename to test/static_analysis/aioretry_main_direct_named_async_args_int_str.py index e6a5214..cc5b910 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_args_int_str.py +++ b/test/static_analysis/aioretry_main_direct_named_async_args_int_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_args_int_str.py ''' +'''Test aioretry_main_direct_named_async_args_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_any_any.py b/test/static_analysis/aioretry_main_direct_named_async_kwargs_any_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_any_any.py rename to test/static_analysis/aioretry_main_direct_named_async_kwargs_any_any.py index 650ac80..3c68610 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_direct_named_async_kwargs_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_kwargs_any_any.py ''' +'''Test aioretry_main_direct_named_async_kwargs_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_any_str.py b/test/static_analysis/aioretry_main_direct_named_async_kwargs_any_str.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_any_str.py rename to test/static_analysis/aioretry_main_direct_named_async_kwargs_any_str.py index 03bc082..bf099f3 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_any_str.py +++ b/test/static_analysis/aioretry_main_direct_named_async_kwargs_any_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_kwargs_any_str.py ''' +'''Test aioretry_main_direct_named_async_kwargs_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_int_any.py b/test/static_analysis/aioretry_main_direct_named_async_kwargs_int_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_int_any.py rename to test/static_analysis/aioretry_main_direct_named_async_kwargs_int_any.py index dcdaaea..235b37d 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_direct_named_async_kwargs_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_kwargs_int_any.py ''' +'''Test aioretry_main_direct_named_async_kwargs_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_int_str.py b/test/static_analysis/aioretry_main_direct_named_async_kwargs_int_str.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_int_str.py rename to test/static_analysis/aioretry_main_direct_named_async_kwargs_int_str.py index 3a8a62d..b5719f4 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_kwargs_int_str.py +++ b/test/static_analysis/aioretry_main_direct_named_async_kwargs_int_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_kwargs_int_str.py ''' +'''Test aioretry_main_direct_named_async_kwargs_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_any_any.py b/test/static_analysis/aioretry_main_direct_named_async_param_any_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_param_any_any.py rename to test/static_analysis/aioretry_main_direct_named_async_param_any_any.py index 730654c..d79a650 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_any_any.py +++ b/test/static_analysis/aioretry_main_direct_named_async_param_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_param_any_any.py ''' +'''Test aioretry_main_direct_named_async_param_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_any_str.py b/test/static_analysis/aioretry_main_direct_named_async_param_any_str.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_param_any_str.py rename to test/static_analysis/aioretry_main_direct_named_async_param_any_str.py index b0cb5c5..01ff4c7 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_any_str.py +++ b/test/static_analysis/aioretry_main_direct_named_async_param_any_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_param_any_str.py ''' +'''Test aioretry_main_direct_named_async_param_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_int_any.py b/test/static_analysis/aioretry_main_direct_named_async_param_int_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_param_int_any.py rename to test/static_analysis/aioretry_main_direct_named_async_param_int_any.py index 0a987fc..f3a9037 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_int_any.py +++ b/test/static_analysis/aioretry_main_direct_named_async_param_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_param_int_any.py ''' +'''Test aioretry_main_direct_named_async_param_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_int_str.py b/test/static_analysis/aioretry_main_direct_named_async_param_int_str.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_async_param_int_str.py rename to test/static_analysis/aioretry_main_direct_named_async_param_int_str.py index 1412467..539bc48 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_async_param_int_str.py +++ b/test/static_analysis/aioretry_main_direct_named_async_param_int_str.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_async_param_int_str.py ''' +'''Test aioretry_main_direct_named_async_param_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_args_any_any.py b/test/static_analysis/aioretry_main_direct_named_sync_args_any_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_sync_args_any_any.py rename to test/static_analysis/aioretry_main_direct_named_sync_args_any_any.py index dad7adc..f9ab04e 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_args_any_any.py +++ b/test/static_analysis/aioretry_main_direct_named_sync_args_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_sync_args_any_any.py ''' +'''Test aioretry_main_direct_named_sync_args_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_args_int_any.py b/test/static_analysis/aioretry_main_direct_named_sync_args_int_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_sync_args_int_any.py rename to test/static_analysis/aioretry_main_direct_named_sync_args_int_any.py index 01a99cf..ba37898 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_args_int_any.py +++ b/test/static_analysis/aioretry_main_direct_named_sync_args_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_sync_args_int_any.py ''' +'''Test aioretry_main_direct_named_sync_args_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_kwargs_any_any.py b/test/static_analysis/aioretry_main_direct_named_sync_kwargs_any_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_sync_kwargs_any_any.py rename to test/static_analysis/aioretry_main_direct_named_sync_kwargs_any_any.py index 34f2382..3d252db 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_direct_named_sync_kwargs_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_sync_kwargs_any_any.py ''' +'''Test aioretry_main_direct_named_sync_kwargs_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_kwargs_int_any.py b/test/static_analysis/aioretry_main_direct_named_sync_kwargs_int_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_sync_kwargs_int_any.py rename to test/static_analysis/aioretry_main_direct_named_sync_kwargs_int_any.py index 1e83fdf..ecb6e8b 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_direct_named_sync_kwargs_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_sync_kwargs_int_any.py ''' +'''Test aioretry_main_direct_named_sync_kwargs_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_param_any_any.py b/test/static_analysis/aioretry_main_direct_named_sync_param_any_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_sync_param_any_any.py rename to test/static_analysis/aioretry_main_direct_named_sync_param_any_any.py index 8379510..37fd73b 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_param_any_any.py +++ b/test/static_analysis/aioretry_main_direct_named_sync_param_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_sync_param_any_any.py ''' +'''Test aioretry_main_direct_named_sync_param_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_param_int_any.py b/test/static_analysis/aioretry_main_direct_named_sync_param_int_any.py similarity index 81% rename from test/static_analysis/aioretry_main_direct_unnamed_named_sync_param_int_any.py rename to test/static_analysis/aioretry_main_direct_named_sync_param_int_any.py index 277e89e..321b86c 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_named_sync_param_int_any.py +++ b/test/static_analysis/aioretry_main_direct_named_sync_param_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_direct_unnamed_named_sync_param_int_any.py ''' +'''Test aioretry_main_direct_named_sync_param_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_any.py b/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_any.py index 281edf5..f5cfe93 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_str.py b/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_str.py index 20d1f69..5555c59 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_str.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_args_any_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_any.py b/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_any.py index d306725..6377520 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_str.py b/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_str.py index 458b20f..3b3b81f 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_str.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_args_int_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_any.py b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_any.py index 9ad8949..c66f949 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_str.py b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_str.py index 3fa56aa..e682b4f 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_str.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_any_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_any.py b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_any.py index ffb5963..db0d8d0 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_str.py b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_str.py index 520bba2..d51f129 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_str.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_kwargs_int_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_any.py b/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_any.py index 142ec83..c209738 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_str.py b/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_str.py index b7a04a2..d060bb5 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_str.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_param_any_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_any.py b/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_any.py index 7150db1..bd9a731 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_str.py b/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_str.py index 7c7307c..dceae34 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_str.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_async_param_int_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_sync_args_any_any.py b/test/static_analysis/aioretry_main_direct_unnamed_sync_args_any_any.py index 4789a54..9aa7612 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_sync_args_any_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_sync_args_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_sync_args_int_any.py b/test/static_analysis/aioretry_main_direct_unnamed_sync_args_int_any.py index 412b5c6..c29ba76 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_sync_args_int_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_sync_args_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_any_any.py b/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_any_any.py index 050be0f..28ea53c 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_any_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_int_any.py b/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_int_any.py index 685f0c1..be60b32 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_int_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_sync_kwargs_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_sync_param_any_any.py b/test/static_analysis/aioretry_main_direct_unnamed_sync_param_any_any.py index 0130093..f953dbe 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_sync_param_any_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_sync_param_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/aioretry_main_direct_unnamed_sync_param_int_any.py b/test/static_analysis/aioretry_main_direct_unnamed_sync_param_int_any.py index 8273767..73533a7 100644 --- a/test/static_analysis/aioretry_main_direct_unnamed_sync_param_int_any.py +++ b/test/static_analysis/aioretry_main_direct_unnamed_sync_param_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import aioretry +from kaioretry import retry, aioretry, Retry, Context @aioretry(Exception, 2) diff --git a/test/static_analysis/retry_built_by_call_sync_args_any_any.py b/test/static_analysis/retry_built_by_call_sync_args_any_any.py index 66f4abe..163faa2 100644 --- a/test/static_analysis/retry_built_by_call_sync_args_any_any.py +++ b/test/static_analysis/retry_built_by_call_sync_args_any_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_args_any_str.py b/test/static_analysis/retry_built_by_call_sync_args_any_str.py index 75adc2d..2a80c6e 100644 --- a/test/static_analysis/retry_built_by_call_sync_args_any_str.py +++ b/test/static_analysis/retry_built_by_call_sync_args_any_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(*args: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_args_int_any.py b/test/static_analysis/retry_built_by_call_sync_args_int_any.py index 87b13c3..7b10cf2 100644 --- a/test/static_analysis/retry_built_by_call_sync_args_int_any.py +++ b/test/static_analysis/retry_built_by_call_sync_args_int_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_args_int_str.py b/test/static_analysis/retry_built_by_call_sync_args_int_str.py index c32c882..f9cc116 100644 --- a/test/static_analysis/retry_built_by_call_sync_args_int_str.py +++ b/test/static_analysis/retry_built_by_call_sync_args_int_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(*args: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_kwargs_any_any.py b/test/static_analysis/retry_built_by_call_sync_kwargs_any_any.py index 377ed2b..b83f792 100644 --- a/test/static_analysis/retry_built_by_call_sync_kwargs_any_any.py +++ b/test/static_analysis/retry_built_by_call_sync_kwargs_any_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_kwargs_any_str.py b/test/static_analysis/retry_built_by_call_sync_kwargs_any_str.py index b8e2457..1025ec7 100644 --- a/test/static_analysis/retry_built_by_call_sync_kwargs_any_str.py +++ b/test/static_analysis/retry_built_by_call_sync_kwargs_any_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_kwargs_int_any.py b/test/static_analysis/retry_built_by_call_sync_kwargs_int_any.py index 637394a..4916ce8 100644 --- a/test/static_analysis/retry_built_by_call_sync_kwargs_int_any.py +++ b/test/static_analysis/retry_built_by_call_sync_kwargs_int_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_kwargs_int_str.py b/test/static_analysis/retry_built_by_call_sync_kwargs_int_str.py index dcc84cc..00bc23d 100644 --- a/test/static_analysis/retry_built_by_call_sync_kwargs_int_str.py +++ b/test/static_analysis/retry_built_by_call_sync_kwargs_int_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_param_any_any.py b/test/static_analysis/retry_built_by_call_sync_param_any_any.py index 490d37f..fef0f59 100644 --- a/test/static_analysis/retry_built_by_call_sync_param_any_any.py +++ b/test/static_analysis/retry_built_by_call_sync_param_any_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_param_any_str.py b/test/static_analysis/retry_built_by_call_sync_param_any_str.py index 0f8afd7..ff845f0 100644 --- a/test/static_analysis/retry_built_by_call_sync_param_any_str.py +++ b/test/static_analysis/retry_built_by_call_sync_param_any_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_param_int_any.py b/test/static_analysis/retry_built_by_call_sync_param_int_any.py index 02ef956..ff5f712 100644 --- a/test/static_analysis/retry_built_by_call_sync_param_int_any.py +++ b/test/static_analysis/retry_built_by_call_sync_param_int_any.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_by_call_sync_param_int_str.py b/test/static_analysis/retry_built_by_call_sync_param_int_str.py index c62d3dc..13a2428 100644 --- a/test/static_analysis/retry_built_by_call_sync_param_int_str.py +++ b/test/static_analysis/retry_built_by_call_sync_param_int_str.py @@ -6,22 +6,19 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -aioretry_decorator = Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry - def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_built_direct_sync_args_any_any.py b/test/static_analysis/retry_built_direct_sync_args_any_any.py index 2becf9d..95c39c1 100644 --- a/test/static_analysis/retry_built_direct_sync_args_any_any.py +++ b/test/static_analysis/retry_built_direct_sync_args_any_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(*args: Any) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_args_any_str.py b/test/static_analysis/retry_built_direct_sync_args_any_str.py index b961523..1415328 100644 --- a/test/static_analysis/retry_built_direct_sync_args_any_str.py +++ b/test/static_analysis/retry_built_direct_sync_args_any_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(*args: Any) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_args_int_any.py b/test/static_analysis/retry_built_direct_sync_args_int_any.py index d77f6b0..c475634 100644 --- a/test/static_analysis/retry_built_direct_sync_args_int_any.py +++ b/test/static_analysis/retry_built_direct_sync_args_int_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(*args: int) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_args_int_str.py b/test/static_analysis/retry_built_direct_sync_args_int_str.py index 6280d7b..b0075a8 100644 --- a/test/static_analysis/retry_built_direct_sync_args_int_str.py +++ b/test/static_analysis/retry_built_direct_sync_args_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(*args: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_kwargs_any_any.py b/test/static_analysis/retry_built_direct_sync_kwargs_any_any.py index a559863..45207ce 100644 --- a/test/static_analysis/retry_built_direct_sync_kwargs_any_any.py +++ b/test/static_analysis/retry_built_direct_sync_kwargs_any_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_kwargs_any_str.py b/test/static_analysis/retry_built_direct_sync_kwargs_any_str.py index f31bad9..0977d2a 100644 --- a/test/static_analysis/retry_built_direct_sync_kwargs_any_str.py +++ b/test/static_analysis/retry_built_direct_sync_kwargs_any_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_kwargs_int_any.py b/test/static_analysis/retry_built_direct_sync_kwargs_int_any.py index 9dfbccb..72e6f2e 100644 --- a/test/static_analysis/retry_built_direct_sync_kwargs_int_any.py +++ b/test/static_analysis/retry_built_direct_sync_kwargs_int_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_kwargs_int_str.py b/test/static_analysis/retry_built_direct_sync_kwargs_int_str.py index 72d5ffc..213596a 100644 --- a/test/static_analysis/retry_built_direct_sync_kwargs_int_str.py +++ b/test/static_analysis/retry_built_direct_sync_kwargs_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_param_any_any.py b/test/static_analysis/retry_built_direct_sync_param_any_any.py index 15b9c24..c78cd03 100644 --- a/test/static_analysis/retry_built_direct_sync_param_any_any.py +++ b/test/static_analysis/retry_built_direct_sync_param_any_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_param_any_str.py b/test/static_analysis/retry_built_direct_sync_param_any_str.py index c0f8b5e..ce7f75a 100644 --- a/test/static_analysis/retry_built_direct_sync_param_any_str.py +++ b/test/static_analysis/retry_built_direct_sync_param_any_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_param_int_any.py b/test/static_analysis/retry_built_direct_sync_param_int_any.py index 328b46d..27148e1 100644 --- a/test/static_analysis/retry_built_direct_sync_param_int_any.py +++ b/test/static_analysis/retry_built_direct_sync_param_int_any.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/retry_built_direct_sync_param_int_str.py b/test/static_analysis/retry_built_direct_sync_param_int_str.py index 069d8ee..943f125 100644 --- a/test/static_analysis/retry_built_direct_sync_param_int_str.py +++ b/test/static_analysis/retry_built_direct_sync_param_int_str.py @@ -6,12 +6,10 @@ import asyncio from typing import Any -from kaioretry import Retry, Context +from kaioretry import retry, aioretry, Retry, Context -@Retry( - exceptions=(ValueError, NotImplementedError), - context=Context(tries=5, delay=2)).retry +@Retry(exceptions=(ValueError, NotImplementedError), context=Context(tries=5, delay=2)).retry def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_args_any_any.py b/test/static_analysis/retry_main_by_call_named_sync_args_any_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_sync_args_any_any.py rename to test/static_analysis/retry_main_by_call_named_sync_args_any_any.py index 28e40d3..d11263f 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_args_any_any.py +++ b/test/static_analysis/retry_main_by_call_named_sync_args_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_sync_args_any_any.py ''' +'''Test retry_main_by_call_named_sync_args_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_any_str.py b/test/static_analysis/retry_main_by_call_named_sync_args_any_str.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_args_any_str.py rename to test/static_analysis/retry_main_by_call_named_sync_args_any_str.py index 4b04777..b47cc3a 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_any_str.py +++ b/test/static_analysis/retry_main_by_call_named_sync_args_any_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_args_any_str.py ''' +'''Test retry_main_by_call_named_sync_args_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_args_int_any.py b/test/static_analysis/retry_main_by_call_named_sync_args_int_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_sync_args_int_any.py rename to test/static_analysis/retry_main_by_call_named_sync_args_int_any.py index 1e28c0b..04e6cc0 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_args_int_any.py +++ b/test/static_analysis/retry_main_by_call_named_sync_args_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_sync_args_int_any.py ''' +'''Test retry_main_by_call_named_sync_args_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_int_str.py b/test/static_analysis/retry_main_by_call_named_sync_args_int_str.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_args_int_str.py rename to test/static_analysis/retry_main_by_call_named_sync_args_int_str.py index 4c6e047..486375a 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_args_int_str.py +++ b/test/static_analysis/retry_main_by_call_named_sync_args_int_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_args_int_str.py ''' +'''Test retry_main_by_call_named_sync_args_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_kwargs_any_any.py b/test/static_analysis/retry_main_by_call_named_sync_kwargs_any_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_sync_kwargs_any_any.py rename to test/static_analysis/retry_main_by_call_named_sync_kwargs_any_any.py index 40f05b9..7a9239e 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_kwargs_any_any.py +++ b/test/static_analysis/retry_main_by_call_named_sync_kwargs_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_sync_kwargs_any_any.py ''' +'''Test retry_main_by_call_named_sync_kwargs_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_any_str.py b/test/static_analysis/retry_main_by_call_named_sync_kwargs_any_str.py similarity index 67% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_any_str.py rename to test/static_analysis/retry_main_by_call_named_sync_kwargs_any_str.py index fec2045..4d62681 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_any_str.py +++ b/test/static_analysis/retry_main_by_call_named_sync_kwargs_any_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_kwargs_any_str.py ''' +'''Test retry_main_by_call_named_sync_kwargs_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_kwargs_int_any.py b/test/static_analysis/retry_main_by_call_named_sync_kwargs_int_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_sync_kwargs_int_any.py rename to test/static_analysis/retry_main_by_call_named_sync_kwargs_int_any.py index fb96d47..3588d6d 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_kwargs_int_any.py +++ b/test/static_analysis/retry_main_by_call_named_sync_kwargs_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_sync_kwargs_int_any.py ''' +'''Test retry_main_by_call_named_sync_kwargs_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_int_str.py b/test/static_analysis/retry_main_by_call_named_sync_kwargs_int_str.py similarity index 67% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_int_str.py rename to test/static_analysis/retry_main_by_call_named_sync_kwargs_int_str.py index f48f70f..5152422 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_kwargs_int_str.py +++ b/test/static_analysis/retry_main_by_call_named_sync_kwargs_int_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_kwargs_int_str.py ''' +'''Test retry_main_by_call_named_sync_kwargs_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_param_any_any.py b/test/static_analysis/retry_main_by_call_named_sync_param_any_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_sync_param_any_any.py rename to test/static_analysis/retry_main_by_call_named_sync_param_any_any.py index bacc746..d607920 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_param_any_any.py +++ b/test/static_analysis/retry_main_by_call_named_sync_param_any_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_sync_param_any_any.py ''' +'''Test retry_main_by_call_named_sync_param_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_any_str.py b/test/static_analysis/retry_main_by_call_named_sync_param_any_str.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_param_any_str.py rename to test/static_analysis/retry_main_by_call_named_sync_param_any_str.py index f8a0121..b9f74e2 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_any_str.py +++ b/test/static_analysis/retry_main_by_call_named_sync_param_any_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_param_any_str.py ''' +'''Test retry_main_by_call_named_sync_param_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_param_int_any.py b/test/static_analysis/retry_main_by_call_named_sync_param_int_any.py similarity index 66% rename from test/static_analysis/aioretry_main_by_call_unnamed_named_sync_param_int_any.py rename to test/static_analysis/retry_main_by_call_named_sync_param_int_any.py index 5872ed7..f214f77 100644 --- a/test/static_analysis/aioretry_main_by_call_unnamed_named_sync_param_int_any.py +++ b/test/static_analysis/retry_main_by_call_named_sync_param_int_any.py @@ -1,4 +1,4 @@ -'''Test aioretry_main_by_call_unnamed_named_sync_param_int_any.py ''' +'''Test retry_main_by_call_named_sync_param_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import aioretry - - -aioretry_decorator = aioretry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = await func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_int_str.py b/test/static_analysis/retry_main_by_call_named_sync_param_int_str.py similarity index 68% rename from test/static_analysis/retry_main_by_call_unnamed_named_sync_param_int_str.py rename to test/static_analysis/retry_main_by_call_named_sync_param_int_str.py index 2a3852a..ac88bc5 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_named_sync_param_int_str.py +++ b/test/static_analysis/retry_main_by_call_named_sync_param_int_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_by_call_unnamed_named_sync_param_int_str.py ''' +'''Test retry_main_by_call_named_sync_param_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(exceptions=Exception, tries=2) +from kaioretry import retry, aioretry, Retry, Context def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(exceptions=Exception, tries=2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_any.py b/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_any.py index ac03677..910c068 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_any.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_str.py b/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_str.py index 0e1d6d4..c7d9a23 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_str.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_args_any_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_any.py b/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_any.py index 97363e3..65965e1 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_any.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_str.py b/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_str.py index aad7bd4..785018c 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_str.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_args_int_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(*args: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_any.py b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_any.py index bfe46d6..6dc6288 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_any.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_str.py b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_str.py index 51334b8..4787a96 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_str.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_any_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_any.py b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_any.py index c8053cb..ea8509d 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_any.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_str.py b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_str.py index b0e3025..78c6de6 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_str.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_kwargs_int_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(**kwargs: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(x=1, y=2) + result = wrapped(x=1, y=2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_any.py b/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_any.py index 402ac23..0c14326 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_any.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(x: Any, y: Any) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_str.py b/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_str.py index 057d881..a16ff48 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_str.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_param_any_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(x: Any, y: Any) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_any.py b/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_any.py index 3f7fe3e..207f804 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_any.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_any.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(x: int, y: int) -> Any: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_str.py b/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_str.py index 6c1b451..fa346d4 100644 --- a/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_str.py +++ b/test/static_analysis/retry_main_by_call_unnamed_sync_param_int_str.py @@ -6,21 +6,19 @@ import asyncio from typing import Any -from kaioretry import retry - - -aioretry_decorator = retry(Exception, 2) +from kaioretry import retry, aioretry, Retry, Context def func(x: int, y: int) -> str: ''' ... ''' return 'return_value' -func = aioretry_decorator(func) + +wrapped = retry(Exception, 2)(func) async def use_decoration(parameter: str) -> str: ''' obtain result and use it ''' - result = func(1, 2) + result = wrapped(1, 2) assert isinstance(result, str) return f"parameter is {parameter}. result is {result}" diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_any_any.py b/test/static_analysis/retry_main_direct_named_sync_args_any_any.py similarity index 82% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_args_any_any.py rename to test/static_analysis/retry_main_direct_named_sync_args_any_any.py index c321da1..03493b2 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_any_any.py +++ b/test/static_analysis/retry_main_direct_named_sync_args_any_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_args_any_any.py ''' +'''Test retry_main_direct_named_sync_args_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_any_str.py b/test/static_analysis/retry_main_direct_named_sync_args_any_str.py similarity index 82% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_args_any_str.py rename to test/static_analysis/retry_main_direct_named_sync_args_any_str.py index 90c581b..8689649 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_any_str.py +++ b/test/static_analysis/retry_main_direct_named_sync_args_any_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_args_any_str.py ''' +'''Test retry_main_direct_named_sync_args_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_int_any.py b/test/static_analysis/retry_main_direct_named_sync_args_int_any.py similarity index 82% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_args_int_any.py rename to test/static_analysis/retry_main_direct_named_sync_args_int_any.py index d25f4a6..4a071f7 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_int_any.py +++ b/test/static_analysis/retry_main_direct_named_sync_args_int_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_args_int_any.py ''' +'''Test retry_main_direct_named_sync_args_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_int_str.py b/test/static_analysis/retry_main_direct_named_sync_args_int_str.py similarity index 82% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_args_int_str.py rename to test/static_analysis/retry_main_direct_named_sync_args_int_str.py index 5013c6b..0dfa68b 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_args_int_str.py +++ b/test/static_analysis/retry_main_direct_named_sync_args_int_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_args_int_str.py ''' +'''Test retry_main_direct_named_sync_args_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_any_any.py b/test/static_analysis/retry_main_direct_named_sync_kwargs_any_any.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_any_any.py rename to test/static_analysis/retry_main_direct_named_sync_kwargs_any_any.py index c4bc887..340ed61 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_any_any.py +++ b/test/static_analysis/retry_main_direct_named_sync_kwargs_any_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_kwargs_any_any.py ''' +'''Test retry_main_direct_named_sync_kwargs_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_any_str.py b/test/static_analysis/retry_main_direct_named_sync_kwargs_any_str.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_any_str.py rename to test/static_analysis/retry_main_direct_named_sync_kwargs_any_str.py index fdabe7f..dd72450 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_any_str.py +++ b/test/static_analysis/retry_main_direct_named_sync_kwargs_any_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_kwargs_any_str.py ''' +'''Test retry_main_direct_named_sync_kwargs_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_int_any.py b/test/static_analysis/retry_main_direct_named_sync_kwargs_int_any.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_int_any.py rename to test/static_analysis/retry_main_direct_named_sync_kwargs_int_any.py index cfe7e15..4b01ad4 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_int_any.py +++ b/test/static_analysis/retry_main_direct_named_sync_kwargs_int_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_kwargs_int_any.py ''' +'''Test retry_main_direct_named_sync_kwargs_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_int_str.py b/test/static_analysis/retry_main_direct_named_sync_kwargs_int_str.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_int_str.py rename to test/static_analysis/retry_main_direct_named_sync_kwargs_int_str.py index a71d013..83fcdc0 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_kwargs_int_str.py +++ b/test/static_analysis/retry_main_direct_named_sync_kwargs_int_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_kwargs_int_str.py ''' +'''Test retry_main_direct_named_sync_kwargs_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_any_any.py b/test/static_analysis/retry_main_direct_named_sync_param_any_any.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_param_any_any.py rename to test/static_analysis/retry_main_direct_named_sync_param_any_any.py index cb180c5..0e6a740 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_any_any.py +++ b/test/static_analysis/retry_main_direct_named_sync_param_any_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_param_any_any.py ''' +'''Test retry_main_direct_named_sync_param_any_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_any_str.py b/test/static_analysis/retry_main_direct_named_sync_param_any_str.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_param_any_str.py rename to test/static_analysis/retry_main_direct_named_sync_param_any_str.py index a6a9ab9..4222aa9 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_any_str.py +++ b/test/static_analysis/retry_main_direct_named_sync_param_any_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_param_any_str.py ''' +'''Test retry_main_direct_named_sync_param_any_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_int_any.py b/test/static_analysis/retry_main_direct_named_sync_param_int_any.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_param_int_any.py rename to test/static_analysis/retry_main_direct_named_sync_param_int_any.py index 3d97a9d..546924a 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_int_any.py +++ b/test/static_analysis/retry_main_direct_named_sync_param_int_any.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_param_int_any.py ''' +'''Test retry_main_direct_named_sync_param_int_any.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_int_str.py b/test/static_analysis/retry_main_direct_named_sync_param_int_str.py similarity index 81% rename from test/static_analysis/retry_main_direct_unnamed_named_sync_param_int_str.py rename to test/static_analysis/retry_main_direct_named_sync_param_int_str.py index 75e85ca..c528f90 100644 --- a/test/static_analysis/retry_main_direct_unnamed_named_sync_param_int_str.py +++ b/test/static_analysis/retry_main_direct_named_sync_param_int_str.py @@ -1,4 +1,4 @@ -'''Test retry_main_direct_unnamed_named_sync_param_int_str.py ''' +'''Test retry_main_direct_named_sync_param_int_str.py ''' # pylint: disable=unused-import, unused-argument, invalid-name, R0801 @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(exceptions=Exception, tries=2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_args_any_any.py b/test/static_analysis/retry_main_direct_unnamed_sync_args_any_any.py index 7e80f41..5a6e698 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_args_any_any.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_args_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_args_any_str.py b/test/static_analysis/retry_main_direct_unnamed_sync_args_any_str.py index e4eb3e7..64025f3 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_args_any_str.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_args_any_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_args_int_any.py b/test/static_analysis/retry_main_direct_unnamed_sync_args_int_any.py index 6c74c57..e6a64f0 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_args_int_any.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_args_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_args_int_str.py b/test/static_analysis/retry_main_direct_unnamed_sync_args_int_str.py index 0203aa5..e3af581 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_args_int_str.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_args_int_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_any.py b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_any.py index 2e20e2a..35d1b6b 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_any.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_str.py b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_str.py index 4e15c3a..6ce4061 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_str.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_any_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_any.py b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_any.py index 9f17781..b725b7e 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_any.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_str.py b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_str.py index d73ec2f..0cfb7fc 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_str.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_kwargs_int_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_param_any_any.py b/test/static_analysis/retry_main_direct_unnamed_sync_param_any_any.py index 320133f..a70952d 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_param_any_any.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_param_any_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_param_any_str.py b/test/static_analysis/retry_main_direct_unnamed_sync_param_any_str.py index 21cd243..dd781ad 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_param_any_str.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_param_any_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_param_int_any.py b/test/static_analysis/retry_main_direct_unnamed_sync_param_int_any.py index bdc48a0..c68ae27 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_param_int_any.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_param_int_any.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2) diff --git a/test/static_analysis/retry_main_direct_unnamed_sync_param_int_str.py b/test/static_analysis/retry_main_direct_unnamed_sync_param_int_str.py index 990aae6..036ac34 100644 --- a/test/static_analysis/retry_main_direct_unnamed_sync_param_int_str.py +++ b/test/static_analysis/retry_main_direct_unnamed_sync_param_int_str.py @@ -6,7 +6,7 @@ import asyncio from typing import Any -from kaioretry import retry +from kaioretry import retry, aioretry, Retry, Context @retry(Exception, 2)