File tree Expand file tree Collapse file tree 6 files changed +31
-11
lines changed
Expand file tree Collapse file tree 6 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "recommendations" : [
3+ " ms-python.black-formatter" ,
4+ " charliermarsh.ruff" ,
5+ " ms-python.python"
6+ ]
7+ }
Original file line number Diff line number Diff line change 1+ {
2+ "[python]" : {
3+ "editor.codeActionsOnSave" : {
4+ "source.fixAll" : true
5+ },
6+ "editor.defaultFormatter" : " ms-python.black-formatter" ,
7+ "editor.formatOnSave" : true
8+ }
9+ }
Original file line number Diff line number Diff line change @@ -92,6 +92,9 @@ line-length = 79
9292
9393branch = true
9494
95+ [tool .coverage .report ]
96+ exclude_lines = [" pragma: no cover" , " if TYPE_CHECKING:" ]
97+
9598[tool .pytest .ini_options ]
9699
97100xfail_strict = true
@@ -174,9 +177,6 @@ ignore = [
174177 " D205" ,
175178 " D212" ,
176179 " D213" ,
177- # Allow backslashes in a docstring.
178- # See https://click.palletsprojects.com/en/8.0.x/documentation/#preventing-rewrapping.
179- " D301" ,
180180 # It is too much work to make every docstring imperative.
181181 " D401" ,
182182 # We ignore some docstyle errors which do not apply to Google style
@@ -188,14 +188,9 @@ ignore = [
188188 " N818" ,
189189 # Ignore "too-many-*" errors as they seem to get in the way more than
190190 # helping.
191- " PLR0912" ,
192191 " PLR0913" ,
193192 # Allow 'assert' as we use it for tests.
194193 " S101" ,
195- # Allow imports which are only used for type checking to be outside type
196- # checking blocks.
197- " TCH002" ,
198- " TCH003" ,
199194]
200195
201196[tool .ruff .per-file-ignores ]
Original file line number Diff line number Diff line change 55from __future__ import annotations
66
77import datetime
8- import io
98from http import HTTPStatus
9+ from typing import TYPE_CHECKING
1010from urllib .parse import urljoin
1111
1212import requests
2727from vws .include_target_data import CloudRecoIncludeTargetData
2828from vws .reports import QueryResult , TargetData
2929
30+ if TYPE_CHECKING :
31+ import io
32+
3033
3134class CloudRecoService :
3235 """
Original file line number Diff line number Diff line change 55from __future__ import annotations
66
77import base64
8- import io
98import json
109from datetime import date
1110from time import sleep
11+ from typing import TYPE_CHECKING
1212from urllib .parse import urljoin
1313
1414import requests
4747 TargetSummaryReport ,
4848)
4949
50+ if TYPE_CHECKING :
51+ import io
52+
5053
5154def _target_api_request (
5255 server_access_key : str ,
Original file line number Diff line number Diff line change 66
77import base64
88import datetime
9- import io
109import random
1110import uuid
11+ from typing import TYPE_CHECKING
1212
1313import pytest
1414from freezegun import freeze_time
2323 TargetSummaryReport ,
2424)
2525
26+ if TYPE_CHECKING :
27+ import io
28+
2629
2730class TestAddTarget :
2831 """
You can’t perform that action at this time.
0 commit comments