Skip to content

Commit ebefbae

Browse files
authored
Update development dependencies, fix lint issue with exception names (#73)
1 parent ad8aea8 commit ebefbae

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Changelog
1212

1313
- fixed timeout value in actively waiting for a run to finish
1414

15+
### Internal changes
16+
17+
- updated development dependencies
18+
1519
[0.4.0](../../releases/tag/v0.4.0) - 2021-09-07
1620
-----------------------------------------------
1721

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
'flake8-quotes ~= 3.3.0',
6060
'isort ~= 5.9.3',
6161
'mypy ~= 0.910',
62-
'pep8-naming ~= 0.11.1',
62+
'pep8-naming ~= 0.12.1',
6363
'pytest ~= 6.2.2',
64-
'sphinx ~= 4.1.2',
64+
'sphinx ~= 4.2.0',
6565
'sphinx-autodoc-typehints ~= 1.12.0',
6666
'sphinx-markdown-builder ~= 0.5.4',
6767
'types-requests ~= 2.25.6',

tests/unit/test_utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ def test__is_file_or_bytes(self) -> None:
110110
def test__retry_with_exp_backoff(self) -> None:
111111
attempt_counter = 0
112112

113-
class RetryableException(Exception):
113+
class RetryableError(Exception):
114114
pass
115115

116-
class BailException(Exception):
116+
class BailError(Exception):
117117
pass
118118

119119
def returns_on_fifth_attempt(bail: Callable, attempt: int) -> Any:
@@ -122,15 +122,15 @@ def returns_on_fifth_attempt(bail: Callable, attempt: int) -> Any:
122122

123123
if attempt == 5:
124124
return 'SUCCESS'
125-
raise RetryableException()
125+
raise RetryableError()
126126

127127
def bails_on_third_attempt(bail: Callable, attempt: int) -> Any:
128128
nonlocal attempt_counter
129129
attempt_counter += 1
130130

131131
if attempt == 3:
132-
bail(BailException())
133-
raise RetryableException()
132+
bail(BailError())
133+
raise RetryableError()
134134

135135
# Returns the correct result after the correct time (should take 100 + 200 + 400 + 800 = 1500 ms)
136136
start = time.time()
@@ -143,13 +143,13 @@ def bails_on_third_attempt(bail: Callable, attempt: int) -> Any:
143143

144144
# Stops retrying when failed for max_retries times
145145
attempt_counter = 0
146-
with self.assertRaises(RetryableException):
146+
with self.assertRaises(RetryableError):
147147
_retry_with_exp_backoff(returns_on_fifth_attempt, max_retries=3, backoff_base_millis=1)
148148
self.assertEqual(attempt_counter, 4)
149149

150150
# Bails when the bail function is called
151151
attempt_counter = 0
152-
with self.assertRaises(BailException):
152+
with self.assertRaises(BailError):
153153
_retry_with_exp_backoff(bails_on_third_attempt, backoff_base_millis=1)
154154
self.assertEqual(attempt_counter, 3)
155155

0 commit comments

Comments
 (0)