Skip to content

Commit b36e32f

Browse files
committed
chore: fix prettier and flake8 issues
1 parent 0b223a3 commit b36e32f

File tree

5 files changed

+19
-23
lines changed

5 files changed

+19
-23
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
### Added
32

43
- Add `GGClient.create_honeytoken()` method.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
### Changed
32

43
- Add `gitguardian_url` and change id type of `honeytoken`'s model.

pygitguardian/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ class Detail(Base):
132132

133133
SCHEMA = DetailSchema()
134134

135-
def __init__(self, detail: str, status_code: Optional[int] = None, **kwargs: Any) -> None:
135+
def __init__(
136+
self, detail: str, status_code: Optional[int] = None, **kwargs: Any
137+
) -> None:
136138
super().__init__(status_code=status_code)
137139
self.detail = detail
138140

tests/test_client.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,7 @@ def test_create_honeytoken(
672672
"name": "honeytoken A",
673673
"description": "honeytoken used in the repository AA",
674674
"created_at": "2019-08-22T14:15:22Z",
675-
"gitguardian_url":
676-
"https://dashboard.gitguardian.com/workspace/1/honeytokens/d45a123f-b15d-4fea-abf6-ff2a8479de5b",
675+
"gitguardian_url": "https://dashboard.gitguardian.com/workspace/1/honeytokens/d45a123f-b15d-4fea-abf6-ff2a8479de5b", # noqa: E501
677676
"status": "active",
678677
"triggered_at": "2019-08-22T14:15:22Z",
679678
"revoked_at": None,
@@ -683,18 +682,17 @@ def test_create_honeytoken(
683682
"revoker_id": None,
684683
"creator_api_token_id": None,
685684
"revoker_api_token_id": None,
686-
"token": {
687-
"access_token_id": "AAAA",
688-
"secret_key": "BBB"
689-
},
690-
"tags": ["publicly_exposed"]
685+
"token": {"access_token_id": "AAAA", "secret_key": "BBB"},
686+
"tags": ["publicly_exposed"],
691687
}
692688

693689
request_mock.return_value = mock_response
694690

695-
result = client.create_honeytoken(name="honeytoken A",
696-
description="honeytoken used in the repository AA",
697-
type_="AWS")
691+
result = client.create_honeytoken(
692+
name="honeytoken A",
693+
description="honeytoken used in the repository AA",
694+
type_="AWS",
695+
)
698696

699697
assert request_mock.called
700698
assert isinstance(result, HoneytokenResponse)
@@ -719,9 +717,11 @@ def test_create_honeytoken_error(
719717

720718
request_mock.return_value = mock_response
721719

722-
result = client.create_honeytoken(name="honeytoken A",
723-
description="honeytoken used in the repository AA",
724-
type_="AWS")
720+
result = client.create_honeytoken(
721+
name="honeytoken A",
722+
description="honeytoken used in the repository AA",
723+
type_="AWS",
724+
)
725725

726726
assert request_mock.called
727727
assert isinstance(result, Detail)

tests/test_models.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ def test_document_handle_surrogates(self):
145145
"name": "honeytoken A",
146146
"description": "honeytoken used in the repository AA",
147147
"created_at": "2019-08-22T14:15:22Z",
148-
"gitguardian_url":
149-
"https://dashboard.gitguardian.com/workspace/1/honeytokens/d45a123f-b15d-4fea-abf6-ff2a8479de5b",
148+
"gitguardian_url": "https://dashboard.gitguardian.com/workspace/1/honeytokens/d45a123f-b15d-4fea-abf6-ff2a8479de5b", # noqa: E501
150149
"status": "active",
151150
"triggered_at": "2019-08-22T14:15:22Z",
152151
"revoked_at": None,
@@ -156,11 +155,8 @@ def test_document_handle_surrogates(self):
156155
"revoker_id": None,
157156
"creator_api_token_id": None,
158157
"revoker_api_token_id": None,
159-
"token": {
160-
"access_token_id": "AAAA",
161-
"secret_key": "BBB"
162-
},
163-
"tags": ["publicly_exposed"]
158+
"token": {"access_token_id": "AAAA", "secret_key": "BBB"},
159+
"tags": ["publicly_exposed"],
164160
},
165161
),
166162
],

0 commit comments

Comments
 (0)