Skip to content

Commit cd5d357

Browse files
committed
chore: update flake8
1 parent 2f6da32 commit cd5d357

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repos:
88
exclude: snap_
99

1010
- repo: https://github.com/PyCQA/flake8
11-
rev: 3.9.2
11+
rev: 7.2.0
1212
hooks:
1313
- id: flake8
1414

pygitguardian/client.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,26 +298,18 @@ def _url_from_endpoint(self, endpoint: str, version: Optional[str]) -> str:
298298

299299
@property
300300
def app_version(self) -> Optional[str]:
301-
global VERSIONS
302-
303301
return VERSIONS.app_version
304302

305303
@app_version.setter
306304
def app_version(self, value: Optional[str]) -> None:
307-
global VERSIONS
308-
309305
VERSIONS.app_version = value
310306

311307
@property
312308
def secrets_engine_version(self) -> Optional[str]:
313-
global VERSIONS
314-
315309
return VERSIONS.secrets_engine_version
316310

317311
@secrets_engine_version.setter
318312
def secrets_engine_version(self, value: Optional[str]) -> None:
319-
global VERSIONS
320-
321313
VERSIONS.secrets_engine_version = value
322314

323315
def get(

tests/test_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,10 @@ def test_content_scan(
434434
else:
435435
pytest.fail("returned should be a ScanResult")
436436

437-
assert type(scan_result.to_dict()) == OrderedDict
437+
assert isinstance(scan_result.to_dict(), OrderedDict)
438438
scan_result_json = scan_result.to_json()
439-
assert type(scan_result_json) == str
440-
assert type(json.loads(scan_result_json)) == dict
439+
assert isinstance(scan_result_json, str)
440+
assert isinstance(json.loads(scan_result_json), dict)
441441

442442

443443
@my_vcr.use_cassette
@@ -771,10 +771,10 @@ def test_quota_overview(client: GGClient):
771771
else:
772772
pytest.fail("returned should be a QuotaResponse")
773773

774-
assert type(quota_response.to_dict()) == OrderedDict
774+
assert isinstance(quota_response.to_dict(), OrderedDict)
775775
quota_response_json = quota_response.to_json()
776-
assert type(quota_response_json) == str
777-
assert type(json.loads(quota_response_json)) == dict
776+
assert isinstance(quota_response_json, str)
777+
assert isinstance(json.loads(quota_response_json), dict)
778778

779779

780780
@pytest.mark.parametrize("method", ["GET", "POST"])

0 commit comments

Comments
 (0)