Skip to content

Commit

Permalink
Apply automatic linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
smkent committed Feb 23, 2023
1 parent a28c5f4 commit 88d041e
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion jmapc/methods/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class CoreBase:
method_namespace: Optional[str] = "Core"
using = set([constants.JMAP_URN_CORE])
using = {constants.JMAP_URN_CORE}


class EchoMethod:
Expand Down
2 changes: 1 addition & 1 deletion jmapc/methods/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class EmailBase:
method_namespace: Optional[str] = "Email"
using = set([constants.JMAP_URN_MAIL])
using = {constants.JMAP_URN_MAIL}


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion jmapc/methods/email_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class EmailSubmissionBase:
method_namespace: Optional[str] = "EmailSubmission"
using = set([constants.JMAP_URN_SUBMISSION])
using = {constants.JMAP_URN_SUBMISSION}


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion jmapc/methods/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class IdentityBase:
method_namespace: Optional[str] = "Identity"
using = set([constants.JMAP_URN_SUBMISSION])
using = {constants.JMAP_URN_SUBMISSION}


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion jmapc/methods/mailbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class MailboxBase:
method_namespace: Optional[str] = "Mailbox"
using = set([constants.JMAP_URN_MAIL])
using = {constants.JMAP_URN_MAIL}


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion jmapc/methods/search_snippet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class SearchSnippetBase:
method_namespace: Optional[str] = "SearchSnippet"
using = set([constants.JMAP_URN_MAIL])
using = {constants.JMAP_URN_MAIL}


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion jmapc/methods/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class ThreadBase:
method_namespace: Optional[str] = "Thread"
using = set([constants.JMAP_URN_MAIL])
using = {constants.JMAP_URN_MAIL}


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion jmapc/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def postprocess(
and isinstance(value, list)
and len(value) > 0
and isinstance(value[0], dict)
and set(value[0].keys()) == set(["name", "value"])
and set(value[0].keys()) == {"name", "value"}
):
data = self.fix_email_headers(data, key, value)
return data
Expand Down
4 changes: 2 additions & 2 deletions tests/methods/test_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_custom_method(
expect_jmap_call(http_responses, expected_request, response)
method = CustomMethod(data=test_data)
method.jmap_method = "Custom/method"
method.using = set([constants.JMAP_URN_MAIL])
method.using = {constants.JMAP_URN_MAIL}
assert method.to_dict() == test_data
resp = client.request(method)
assert resp == CustomResponse(account_id="u1138", data=test_data)
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_custom_method_as_result_reference_target(
expect_jmap_call(http_responses, expected_request, response)
method = CustomMethod(data=test_data)
method.jmap_method = "Custom/method"
method.using = set([constants.JMAP_URN_MAIL])
method.using = {constants.JMAP_URN_MAIL}
assert method.to_dict() == test_data
resp = client.request([method, MailboxGet(ids=Ref("/example"))])
assert resp == [
Expand Down

0 comments on commit 88d041e

Please sign in to comment.