Skip to content

Commit 0090b8c

Browse files
committed
Apply ruff format to tests too
The last uncovered piece of code base.
1 parent 78b7764 commit 0090b8c

30 files changed

+2869
-3046
lines changed

pyproject.toml

-3
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,6 @@ target-version = "py39"
295295

296296
[tool.ruff.format]
297297
quote-style = "preserve" # TODO: Convert to a specific quote style
298-
exclude = [
299-
"tests/*",
300-
]
301298

302299
[tool.ruff.lint]
303300
select = [

tests/__init__.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,25 @@ def reset_common() -> None:
2222
from tmt.base import Core, Plan, Run, Story, Test, Tree
2323
from tmt.utils import Common, MultiInvokableCommon
2424

25-
for klass in (
26-
Core, Run, Tree, Test, Plan, Story,
27-
Common, MultiInvokableCommon):
28-
25+
for klass in (Core, Run, Tree, Test, Plan, Story, Common, MultiInvokableCommon):
2926
klass.cli_invocation = None
3027

3128

3229
class CliRunner(click.testing.CliRunner):
3330
def invoke(
34-
self,
35-
cli: click.core.BaseCommand,
36-
args: Optional[Union[str, Sequence[str]]] = None,
37-
input: Optional[Union[str, bytes, IO]] = None,
38-
env: Optional[Mapping[str, Optional[str]]] = None,
39-
catch_exceptions: bool = True,
40-
color: bool = False,
41-
**extra: Any) -> click.testing.Result:
31+
self,
32+
cli: click.core.BaseCommand,
33+
args: Optional[Union[str, Sequence[str]]] = None,
34+
input: Optional[Union[str, bytes, IO]] = None,
35+
env: Optional[Mapping[str, Optional[str]]] = None,
36+
catch_exceptions: bool = True,
37+
color: bool = False,
38+
**extra: Any,
39+
) -> click.testing.Result:
4240
reset_common()
4341

4442
from tmt.__main__ import import_cli_commands
43+
4544
import_cli_commands()
4645

4746
return super().invoke(
@@ -51,4 +50,5 @@ def invoke(
5150
env=env,
5251
catch_exceptions=catch_exceptions,
5352
color=color,
54-
**extra)
53+
**extra,
54+
)

tests/integration/__init__.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212

1313
# decorate functions what communicates with nitrate
1414
nitrate.xmlrpc_driver.GSSAPITransport.single_request = Guess.decorator_plain()(
15-
nitrate.xmlrpc_driver.GSSAPITransport.single_request)
15+
nitrate.xmlrpc_driver.GSSAPITransport.single_request
16+
)
1617
nitrate.xmlrpc_driver.GSSAPITransport.single_request_with_cookies = Guess.decorator_plain()(
17-
nitrate.xmlrpc_driver.GSSAPITransport.single_request_with_cookies)
18+
nitrate.xmlrpc_driver.GSSAPITransport.single_request_with_cookies
19+
)
1820

1921
# decorate functions that communicate with bugzilla (xmlrpc)
2022
_BugzillaXMLRPCTransport.single_request = Guess.decorator_plain()(
21-
_BugzillaXMLRPCTransport.single_request)
22-
sessions.Session.send = RequestResponseHandling.decorator(
23-
item_list=[1])(
24-
sessions.Session.send)
23+
_BugzillaXMLRPCTransport.single_request
24+
)
25+
sessions.Session.send = RequestResponseHandling.decorator(item_list=[1])(sessions.Session.send)
2526

2627
tmt.utils.git.check_git_url = Guess.decorator_plain()(tmt.utils.git.check_git_url)
2728

0 commit comments

Comments
 (0)