@@ -280,8 +280,7 @@ def _onchange_quiet(self, name, old, new) -> None:
280280
281281@pytest .fixture
282282def onchange_app ():
283- app = OnChangeHookApp ()
284- return app
283+ return OnChangeHookApp ()
285284
286285
287286def test_set_onchange_hook (onchange_app ) -> None :
@@ -847,15 +846,13 @@ def _expected_no_editor_error():
847846 if hasattr (sys , "pypy_translation_info" ):
848847 expected_exception = 'EnvironmentError'
849848
850- expected_text = normalize (
849+ return normalize (
851850 f"""
852851EXCEPTION of type '{ expected_exception } ' occurred with message: Please use 'set editor' to specify your text editing program of choice.
853852To enable full traceback, run the following command: 'set debug true'
854853"""
855854 )
856855
857- return expected_text
858-
859856
860857def test_base_debug (base_app ) -> None :
861858 # Purposely set the editor to None
@@ -1086,8 +1083,7 @@ def postparsing_precmd(self, data: cmd2.plugin.PostparsingData) -> cmd2.plugin.P
10861083
10871084@pytest .fixture
10881085def hook_failure ():
1089- app = HookFailureApp ()
1090- return app
1086+ return HookFailureApp ()
10911087
10921088
10931089def test_precmd_hook_success (base_app ) -> None :
@@ -1211,8 +1207,7 @@ def do_parser_cmd(self, args) -> None:
12111207
12121208@pytest .fixture
12131209def help_app ():
1214- app = HelpApp ()
1215- return app
1210+ return HelpApp ()
12161211
12171212
12181213def test_custom_command_help (help_app ) -> None :
@@ -1285,8 +1280,7 @@ def do_undoc(self, arg) -> None:
12851280
12861281@pytest .fixture
12871282def helpcat_app ():
1288- app = HelpCategoriesApp ()
1289- return app
1283+ return HelpCategoriesApp ()
12901284
12911285
12921286def test_help_cat_base (helpcat_app ) -> None :
@@ -1342,8 +1336,7 @@ def do_return_type(self, arg) -> None:
13421336
13431337@pytest .fixture
13441338def select_app ():
1345- app = SelectApp ()
1346- return app
1339+ return SelectApp ()
13471340
13481341
13491342def test_select_options (select_app , monkeypatch ) -> None :
@@ -1592,8 +1585,7 @@ def do_orate(self, opts, arg) -> None:
15921585
15931586@pytest .fixture
15941587def multiline_app ():
1595- app = MultilineApp ()
1596- return app
1588+ return MultilineApp ()
15971589
15981590
15991591def test_multiline_complete_empty_statement_raises_exception (multiline_app ) -> None :
@@ -1759,8 +1751,7 @@ def do_negative_no_data(self, arg) -> None:
17591751
17601752@pytest .fixture
17611753def commandresult_app ():
1762- app = CommandResultApp ()
1763- return app
1754+ return CommandResultApp ()
17641755
17651756
17661757def test_commandresult_truthy (commandresult_app ) -> None :
@@ -2813,8 +2804,7 @@ def do_has_no_helper_funcs(self, arg) -> None:
28132804
28142805@pytest .fixture
28152806def disable_commands_app ():
2816- app = DisableCommandsApp ()
2817- return app
2807+ return DisableCommandsApp ()
28182808
28192809
28202810def test_disable_and_enable_category (disable_commands_app ) -> None :
0 commit comments