Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[CLEANUP] remove whitespace and add None default value back
  • Loading branch information
michael-linnane-lrn committed Aug 29, 2024
commit 3e184562b42e12ea61554bb2fa2a1b715b263795
5 changes: 3 additions & 2 deletions learnosity_sdk/request/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import hmac
import json
import platform
from typing import Any, Dict, Iterable, Union
from typing import Any, Dict, Iterable, Optional, Union
from learnosity_sdk._version import __version__

from learnosity_sdk.exceptions import ValidationException
Expand Down Expand Up @@ -35,7 +35,8 @@ class Init(object):

def __init__(
self, service: str, security: Dict[str, Any], secret: str,
request: Dict[str, Any], action:str) -> None:
request: Optional[Dict[str, Any]] = None, action:Optional[str] = None) -> None:
# Using None as a default value will throw mypy typecheck issues. This should be addressed
self.service = service
self.security = security.copy()
self.secret = secret
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_dataapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_results_iter_error_status(self):
with self.assertRaises(DataApiException) as cm:
list(client.results_iter(self.endpoint, self.security, self.consumer_secret,
self.request, self.action))

self.assertEqual("server returned HTTP status 500", str(cm.exception))

@responses.activate
Expand Down