leaf-common 1.4.2__tar.gz → 1.4.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. {leaf_common-1.4.2 → leaf_common-1.4.3}/PKG-INFO +1 -1
  2. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/asyncio_executor.py +18 -12
  3. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/resolution/resolver_util.py +5 -2
  4. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/utils/exception_util.py +3 -1
  5. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common.egg-info/PKG-INFO +1 -1
  6. {leaf_common-1.4.2 → leaf_common-1.4.3}/.coveragerc +0 -0
  7. {leaf_common-1.4.2 → leaf_common-1.4.3}/.flake8 +0 -0
  8. {leaf_common-1.4.2 → leaf_common-1.4.3}/.github/workflows/checkmarx.yml +0 -0
  9. {leaf_common-1.4.2 → leaf_common-1.4.3}/.github/workflows/codeql.yml +0 -0
  10. {leaf_common-1.4.2 → leaf_common-1.4.3}/.github/workflows/publish.yml +0 -0
  11. {leaf_common-1.4.2 → leaf_common-1.4.3}/.github/workflows/tests.yml +0 -0
  12. {leaf_common-1.4.2 → leaf_common-1.4.3}/.gitignore +0 -0
  13. {leaf_common-1.4.2 → leaf_common-1.4.3}/.pylintrc +0 -0
  14. {leaf_common-1.4.2 → leaf_common-1.4.3}/CODE_OF_CONDUCT.md +0 -0
  15. {leaf_common-1.4.2 → leaf_common-1.4.3}/CONTRIBUTING.md +0 -0
  16. {leaf_common-1.4.2 → leaf_common-1.4.3}/LICENSE.txt +0 -0
  17. {leaf_common-1.4.2 → leaf_common-1.4.3}/Makefile +0 -0
  18. {leaf_common-1.4.2 → leaf_common-1.4.3}/NOTICE.txt +0 -0
  19. {leaf_common-1.4.2 → leaf_common-1.4.3}/README.md +0 -0
  20. {leaf_common-1.4.2 → leaf_common-1.4.3}/SECURITY.md +0 -0
  21. {leaf_common-1.4.2 → leaf_common-1.4.3}/SUPPORT.md +0 -0
  22. {leaf_common-1.4.2 → leaf_common-1.4.3}/build_scripts/copyright_config.json +0 -0
  23. {leaf_common-1.4.2 → leaf_common-1.4.3}/build_scripts/run_flake8.sh +0 -0
  24. {leaf_common-1.4.2 → leaf_common-1.4.3}/build_scripts/run_pylint.sh +0 -0
  25. {leaf_common-1.4.2 → leaf_common-1.4.3}/build_scripts/source_available_copyright.txt +0 -0
  26. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/__init__.py +0 -0
  27. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/__init__.py +0 -0
  28. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/async_to_sync_generator.py +0 -0
  29. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/asyncio_executor_pool.py +0 -0
  30. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/asyncio_threadpool_executor.py +0 -0
  31. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/event_loop_factory.py +0 -0
  32. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/event_loop_lag_monitor.py +0 -0
  33. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/asyncio/task_executor.py +0 -0
  34. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/__init__.py +0 -0
  35. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/config_filter.py +0 -0
  36. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/config_filter_chain.py +0 -0
  37. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/config_handler.py +0 -0
  38. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/config_util.py +0 -0
  39. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/dictionary_overlay.py +0 -0
  40. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/environment_defaults.py +0 -0
  41. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/config/file_of_class.py +0 -0
  42. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/__init__.py +0 -0
  43. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/conditional_logger.py +0 -0
  44. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/example_logging_config.hocon +0 -0
  45. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/logging_setup.py +0 -0
  46. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/message_types.py +0 -0
  47. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/sensitive_logger.py +0 -0
  48. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/service_log_record.py +0 -0
  49. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/stream_to_logger.py +0 -0
  50. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/logging/structured_log_record.py +0 -0
  51. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/__init__.py +0 -0
  52. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/boolean_list_parser.py +0 -0
  53. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/boolean_parser.py +0 -0
  54. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/canonical_multi_config_parser.py +0 -0
  55. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/dictionary_extractor.py +0 -0
  56. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/field_extractor.py +0 -0
  57. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/list_parser.py +0 -0
  58. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/parser.py +0 -0
  59. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/parsers/string_parser.py +0 -0
  60. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/__init__.py +0 -0
  61. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/__init__.py +0 -0
  62. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/abstract_easy_persistence.py +0 -0
  63. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/composite_persistor.py +0 -0
  64. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/easy_hocon_persistence.py +0 -0
  65. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/easy_json_persistence.py +0 -0
  66. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/easy_txt_persistence.py +0 -0
  67. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/easy/easy_yaml_persistence.py +0 -0
  68. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/README.md +0 -0
  69. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/__init__.py +0 -0
  70. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/abstract_persistence.py +0 -0
  71. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/hocon_persistence.py +0 -0
  72. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/json_gzip_persistence.py +0 -0
  73. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/json_persistence.py +0 -0
  74. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/null_persistence.py +0 -0
  75. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/override_file_extension_provider.py +0 -0
  76. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/persistence_factory.py +0 -0
  77. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/raw_bytes_persistence.py +0 -0
  78. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/reference_helper.py +0 -0
  79. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/simple_file_persistence.py +0 -0
  80. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/text_persistence.py +0 -0
  81. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/factory/yaml_persistence.py +0 -0
  82. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/interface/__init__.py +0 -0
  83. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/interface/persistence.py +0 -0
  84. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/interface/persistence_mechanism.py +0 -0
  85. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/interface/persistor.py +0 -0
  86. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/interface/restorer.py +0 -0
  87. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/mechanism/__init__.py +0 -0
  88. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/mechanism/abstract_persistence_mechanism.py +0 -0
  89. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/mechanism/local_file_persistence_mechanism.py +0 -0
  90. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/mechanism/persistence_mechanism_factory.py +0 -0
  91. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/mechanism/persistence_mechanisms.py +0 -0
  92. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/persistence/mechanism/s3_file_persistence_mechanism.py +0 -0
  93. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/profiling/__init__.py +0 -0
  94. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/profiling/async_profiling_lock.py +0 -0
  95. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/profiling/memory_util.py +0 -0
  96. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/profiling/profiling_lock.py +0 -0
  97. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/resolution/__init__.py +0 -0
  98. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/resolution/deprecation_redirect.py +0 -0
  99. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/resolution/resolver.py +0 -0
  100. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/__init__.py +0 -0
  101. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/__init__.py +0 -0
  102. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/buffered_gzip_serialization_format.py +0 -0
  103. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/chained_serialization_format.py +0 -0
  104. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/conversion_policy.py +0 -0
  105. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/gzip_serialization_format.py +0 -0
  106. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/hocon_serialization_format.py +0 -0
  107. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/json_serialization_format.py +0 -0
  108. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/raw_bytes_serialization_format.py +0 -0
  109. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/serialization_formats.py +0 -0
  110. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/text_serialization_format.py +0 -0
  111. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/format/yaml_serialization_format.py +0 -0
  112. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/__init__.py +0 -0
  113. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/deserializer.py +0 -0
  114. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/dictionary_converter.py +0 -0
  115. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/file_extension_provider.py +0 -0
  116. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/reference_pruner.py +0 -0
  117. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/serialization_format.py +0 -0
  118. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/interface/serializer.py +0 -0
  119. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/prep/__init__.py +0 -0
  120. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/prep/empty_dictionary_converter.py +0 -0
  121. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/prep/pass_through_dictionary_converter.py +0 -0
  122. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/prep/pass_through_reference_pruner.py +0 -0
  123. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/prep/redactor_dictionary_converter.py +0 -0
  124. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/util/__init__.py +0 -0
  125. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/util/bytes_decoder.py +0 -0
  126. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/serialization/util/text_file_reader.py +0 -0
  127. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/time/__init__.py +0 -0
  128. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/time/time_util.py +0 -0
  129. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/time/timeout.py +0 -0
  130. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/time/timeout_reached_exception.py +0 -0
  131. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/utils/__init__.py +0 -0
  132. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/utils/async_atomic_counter.py +0 -0
  133. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/utils/atomic_counter.py +0 -0
  134. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/utils/startable.py +0 -0
  135. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/validation/__init__.py +0 -0
  136. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/validation/composite_dictionary_validator.py +0 -0
  137. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common/validation/dictionary_validator.py +0 -0
  138. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common.egg-info/SOURCES.txt +0 -0
  139. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common.egg-info/dependency_links.txt +0 -0
  140. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common.egg-info/requires.txt +0 -0
  141. {leaf_common-1.4.2 → leaf_common-1.4.3}/leaf_common.egg-info/top_level.txt +0 -0
  142. {leaf_common-1.4.2 → leaf_common-1.4.3}/pyproject.toml +0 -0
  143. {leaf_common-1.4.2 → leaf_common-1.4.3}/requirements-build.txt +0 -0
  144. {leaf_common-1.4.2 → leaf_common-1.4.3}/requirements.txt +0 -0
  145. {leaf_common-1.4.2 → leaf_common-1.4.3}/setup.cfg +0 -0
  146. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/__init__.py +0 -0
  147. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/__init__.py +0 -0
  148. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/async_test_helpers.py +0 -0
  149. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_executor_metrics_test.py +0 -0
  150. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_executor_not_started_test.py +0 -0
  151. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_executor_pool_dump_tasks_test.py +0 -0
  152. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_executor_pool_gc_test.py +0 -0
  153. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_executor_pool_metrics_test.py +0 -0
  154. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_executor_started_test.py +0 -0
  155. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/asyncio_threadpool_executor_metrics_test.py +0 -0
  156. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/callable_class.py +0 -0
  157. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/event_loop_factory_test.py +0 -0
  158. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/asyncio/sync_test_helpers.py +0 -0
  159. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/config/__init__.py +0 -0
  160. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/config/dictionary_overlay_test.py +0 -0
  161. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/config/test_config_util.py +0 -0
  162. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/parsers/__init__.py +0 -0
  163. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/parsers/boolean_parser_test.py +0 -0
  164. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/parsers/canonical_multi_config_parser_test.py +0 -0
  165. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/resolution/__init__.py +0 -0
  166. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/resolution/resolver_util_test.py +0 -0
  167. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/resolution/test_deprecation_redirect.py +0 -0
  168. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/__init__.py +0 -0
  169. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/encoding/__init__.py +0 -0
  170. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/encoding/decode_text_test.py +0 -0
  171. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/encoding/text_file_reader_test.py +0 -0
  172. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/format/__init__.py +0 -0
  173. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/format/hocon_serialization_format_test.py +0 -0
  174. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/prep/__init__.py +0 -0
  175. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/serialization/prep/redactor_dictionary_converter_test.py +0 -0
  176. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/time/__init__.py +0 -0
  177. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/time/timeout_test.py +0 -0
  178. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/utils/__init__.py +0 -0
  179. {leaf_common-1.4.2 → leaf_common-1.4.3}/tests/utils/test_exception_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leaf-common
3
- Version: 1.4.2
3
+ Version: 1.4.3
4
4
  Summary: LEAF team common code library
5
5
  Author-email: Dan Fink <Daniel.Fink@cognizant.com>
6
6
  License-Expression: Apache-2.0
@@ -22,6 +22,7 @@ from typing import Awaitable
22
22
  from typing import Callable
23
23
  from typing import Dict
24
24
  from typing import List
25
+ from typing import Set
25
26
  from typing import Tuple
26
27
 
27
28
  from functools import partial
@@ -161,7 +162,7 @@ class AsyncioExecutor(TaskExecutor):
161
162
 
162
163
  # If we reach here, the loop was stopped.
163
164
  # We should gather any remaining tasks and finish them.
164
- pending = all_tasks(loop=loop)
165
+ pending: Set[Task] = all_tasks(loop=loop)
165
166
  if pending:
166
167
  # We want all possibly pending tasks to execute -
167
168
  # don't need them to raise exceptions.
@@ -185,9 +186,9 @@ class AsyncioExecutor(TaskExecutor):
185
186
  # Call the default exception handler first
186
187
  loop.default_exception_handler(context)
187
188
 
188
- message = context.get("message", None)
189
- exception = context.get("exception", None)
190
- formatted_exception = format_exception(exception)
189
+ message: str = context.get("message", None)
190
+ exception: Exception = context.get("exception", None)
191
+ formatted_exception: List[str] = format_exception(exception)
191
192
  print(f"Event loop traceback ({message}):\n{formatted_exception}")
192
193
 
193
194
  def get_function_name(self, function, submitter_id: str) -> str:
@@ -345,7 +346,7 @@ class AsyncioExecutor(TaskExecutor):
345
346
  "task": task,
346
347
  "raise_exception": raise_exception
347
348
  }
348
- task_id = id(task)
349
+ task_id: int = id(task)
349
350
  self._background_tasks[task_id] = task_info_dict
350
351
  task.add_done_callback(self.submission_done)
351
352
  return task
@@ -353,11 +354,13 @@ class AsyncioExecutor(TaskExecutor):
353
354
  @staticmethod
354
355
  async def _cancel_and_drain(tasks: List[AsyncFuture]):
355
356
  # Request cancellation for tasks that are not already done:
356
- pending = []
357
+ pending: List[AsyncFuture] = []
357
358
  for task in tasks:
358
- if not task.done():
359
- task.cancel("cancel-and-drain")
360
- pending.append(task)
359
+ test_task: AsyncFuture = task
360
+ test_task_done: bool = test_task.done()
361
+ if not test_task_done:
362
+ test_task.cancel("cancel-and-drain")
363
+ pending.append(test_task)
361
364
  # Don't raise exceptions in the tasks being cancelled -
362
365
  # we don't really need to react to them.
363
366
  _ = await gather(*pending, return_exceptions=True)
@@ -457,11 +460,14 @@ class AsyncioExecutor(TaskExecutor):
457
460
  # pylint: disable=broad-exception-caught
458
461
  except Exception as exc:
459
462
  formatted_exception: List[str] = format_exception(exc)
463
+ sensitive_logger = SensitiveLogger(self.logger)
460
464
  for line in formatted_exception:
465
+ # Respect const-ness
466
+ use_line: str = line
461
467
  if line.endswith("\n"):
462
- line = line[:-1]
463
- sensitive_logger = SensitiveLogger(self.logger)
464
- sensitive_logger.info("%s", line)
468
+ # Remove the newline
469
+ use_line = line[:-1]
470
+ sensitive_logger.info("%s", use_line)
465
471
 
466
472
  # As a last gesture, remove the background task from the map
467
473
  # we use to keep its reference around. Do it safely:
@@ -104,7 +104,9 @@ class ResolverUtil:
104
104
  module_name = class_split[0]
105
105
  else:
106
106
  # handles <package_name>.<module_name>.<ClassName>
107
- packages = [".".join(class_split[:-2])]
107
+ class_list: List[str] = class_split[:-2]
108
+ class_join: str = ".".join(class_list)
109
+ packages = [class_join]
108
110
  module_name = class_split[-2]
109
111
 
110
112
  new_class_name: str = class_split[-1]
@@ -142,7 +144,8 @@ class ResolverUtil:
142
144
  return None
143
145
 
144
146
  name_split: List[str] = fully_qualified_name.split(".")
145
- module_name: str = ".".join(name_split[:-1])
147
+ module_list: List[str] = name_split[:-1]
148
+ module_name: str = ".".join(module_list)
146
149
  class_name: str = name_split[-1]
147
150
 
148
151
  resolver = Resolver()
@@ -50,7 +50,9 @@ class ExceptionUtil:
50
50
 
51
51
  # Create indentation string based on current nesting level
52
52
  # Each level adds 2 spaces for visual hierarchy
53
- spaces: str = " " * indent
53
+ spaces: str = ""
54
+ for _ in range(indent):
55
+ spaces += " "
54
56
 
55
57
  # Start building the message with exception type and description
56
58
  # Format: "ExceptionType: exception message"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: leaf-common
3
- Version: 1.4.2
3
+ Version: 1.4.3
4
4
  Summary: LEAF team common code library
5
5
  Author-email: Dan Fink <Daniel.Fink@cognizant.com>
6
6
  License-Expression: Apache-2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes