Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove insensitive language (box/box-codegen#477) #132

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "267eec8", "specHash": "1698c95", "version": "0.6.4" }
{ "engineHash": "c437976", "specHash": "1698c95", "version": "0.6.4" }
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# pygtk.require().
#init-hook=

# Add files or directories to the blacklist. They should be base names, not
# Add files or directories to the denylist. They should be base names, not
# paths.
#ignore=CVS

Expand Down
3 changes: 2 additions & 1 deletion box_sdk_gen/box/ccg_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,5 @@ def revoke_token(self, *, network_session: Optional[NetworkSession] = None) -> N
client_secret=self.config.client_secret,
token=old_token.access_token,
)
return self.token_storage.clear()
self.token_storage.clear()
return None
3 changes: 2 additions & 1 deletion box_sdk_gen/box/jwt_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,5 @@ def revoke_token(self, *, network_session: Optional[NetworkSession] = None) -> N
client_secret=self.config.client_secret,
token=old_token.access_token,
)
return self.token_storage.clear()
self.token_storage.clear()
return None
8 changes: 4 additions & 4 deletions test/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def test_make_request_unauthorised(mock_requests_session, response_401):
@pytest.mark.parametrize(
'exc_message, expected_reauthentication_needed',
[
('Connection aborted', False),
('Connection cancelled', False),
(
"Connection broken: ConnectionResetError(54, 'Connection reset by peer')",
False,
Expand Down Expand Up @@ -334,7 +334,7 @@ def test_make_request_network_exception(
def test_fetch_successfully_retry_network_exception(
mock_requests_session, network_session_mock, response_200
):
requests_exception = RequestException('Connection aborted')
requests_exception = RequestException('Connection cancelled')
mock_requests_session.request.side_effect = [requests_exception, response_200]

with patch('time.sleep'):
Expand All @@ -347,11 +347,11 @@ def test_fetch_successfully_retry_network_exception(
def test_fetch_make_only_one_retry_for_network_exception(
mock_requests_session, network_session_mock
):
requests_exception = RequestException('Connection aborted')
requests_exception = RequestException('Connection cancelled')
mock_requests_session.request.side_effect = [requests_exception, requests_exception]

with patch('time.sleep'):
with pytest.raises(BoxSDKError, match='Connection aborted'):
with pytest.raises(BoxSDKError, match='Connection cancelled'):
fetch(
"https://example.com",
FetchOptions(network_session=network_session_mock),
Expand Down
Loading