strideutils 0.4.0__tar.gz → 0.4.2__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 (33) hide show
  1. {strideutils-0.4.0 → strideutils-0.4.2}/PKG-INFO +1 -1
  2. {strideutils-0.4.0 → strideutils-0.4.2}/pyproject.toml +1 -1
  3. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/exec_tx.py +1 -1
  4. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/run_safely.py +1 -1
  5. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/stride_alerts.py +2 -1
  6. {strideutils-0.4.0 → strideutils-0.4.2}/README.md +0 -0
  7. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/Makefile +0 -0
  8. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/__init__.py +0 -0
  9. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/coingecko.py +0 -0
  10. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/config_examples/strideutils_config.yaml.example +0 -0
  11. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/config_examples/strideutils_secrets.yaml.example +0 -0
  12. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/cryptography.py +0 -0
  13. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/invariant_helpers.py +0 -0
  14. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/sheets_connector.py +0 -0
  15. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/slack_connector.py +0 -0
  16. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/stride_config.py +0 -0
  17. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/stride_requests.py +0 -0
  18. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/stride_upstash.py +0 -0
  19. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/twilio_connector.py +0 -0
  20. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils/types.py +0 -0
  21. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/__init__.pyi +0 -0
  22. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/coingecko.pyi +0 -0
  23. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/cryptography.pyi +0 -0
  24. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/exec_tx.pyi +0 -0
  25. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/invariant_helpers.pyi +0 -0
  26. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/run_safely.pyi +0 -0
  27. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/sheets_connector.pyi +0 -0
  28. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/slack_connector.pyi +0 -0
  29. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/stride_alerts.pyi +0 -0
  30. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/stride_config.pyi +0 -0
  31. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/stride_requests.pyi +0 -0
  32. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/stride_upstash.pyi +0 -0
  33. {strideutils-0.4.0 → strideutils-0.4.2}/strideutils-stubs/twilio_connector.pyi +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strideutils
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary:
5
5
  Author: Your Name
6
6
  Author-email: you@example.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "strideutils"
3
- version = "0.4.0"
3
+ version = "0.4.2"
4
4
  description = ""
5
5
  authors = ["Your Name <you@example.com>"]
6
6
  readme = "README.md"
@@ -39,7 +39,7 @@ def execute_tx(command: str, api_endpoint: str = config.stride.api_endpoint) ->
39
39
  for _ in range(30):
40
40
  time.sleep(2)
41
41
  tx_response = stride_requests.get_txs(event_filters, api_endpoint)
42
- if tx_response['total'] != '0':
42
+ if tx_response.get('tx_responses'):
43
43
  try:
44
44
  response_code = tx_response['tx_responses'][0]['code']
45
45
  raw_log = tx_response['tx_responses'][0]['raw_log']
@@ -41,7 +41,7 @@ def try_and_log_with_status(
41
41
  # the function will return a bool indicating if the function was executed
42
42
  # If it was skipped, use a different emoji
43
43
  output = func()
44
- func_skipped = len(output) == 2 and not output[0]
44
+ func_skipped = type(output) is tuple and len(output) == 2 and not output[0]
45
45
 
46
46
  emoji_print = "⚪" if func_skipped else "✅"
47
47
  emoji_slack = ":white_circle:" if func_skipped else ":white_check_mark:"
@@ -113,7 +113,7 @@ def raise_alert(
113
113
  @wraps(f)
114
114
  def _func(*args, **kwargs):
115
115
  output = f(*args, **kwargs)
116
- msgs = output[-1] if type(output) is Tuple else output
116
+ msgs: List = output[-1] if type(output) is tuple and len(output) == 2 else output # type: ignore
117
117
  if urgency == 'debug':
118
118
  debug_msg = (
119
119
  'In debug mode. Tags and calls have been disabled' 'and the message is routed to alerts-debug.'
@@ -130,6 +130,7 @@ def raise_alert(
130
130
  debug_readme=debug_readme,
131
131
  debug_readme_section=debug_readme_section,
132
132
  )
133
+ return output
133
134
 
134
135
  return _func
135
136
 
File without changes