diff options
author | Mads Jensen <mje@inducks.org> | 2022-02-04 20:57:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 20:57:21 +0300 |
commit | 6c278c3352e84f14880f89021ed6fb9c62e1e320 (patch) | |
tree | 0c96a6f28c725ce93b811c409d1c7aa6bebaa6dc | |
parent | d1608f8f2d4163d7f6bd26bda63decffd6f823e2 (diff) |
Inline dict creation in _assert_valid_call. (#9190)
PyCharm has this check, and it's the only one it could find. It'll cut off valuable nanoseconds off the test suite run 😄
-rw-r--r-- | certbot/certbot/tests/util.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/certbot/certbot/tests/util.py b/certbot/certbot/tests/util.py index 7889ded98..532220f4d 100644 --- a/certbot/certbot/tests/util.py +++ b/certbot/certbot/tests/util.py @@ -410,10 +410,11 @@ def _create_display_util_mock_with_stdout(stdout: IO) -> FreezableMock: def _assert_valid_call(*args: Any, **kwargs: Any) -> None: assert_args = [args[0] if args else kwargs['message']] - assert_kwargs = {} - assert_kwargs['default'] = kwargs.get('default', None) - assert_kwargs['cli_flag'] = kwargs.get('cli_flag', None) - assert_kwargs['force_interactive'] = kwargs.get('force_interactive', False) + assert_kwargs = { + 'default': kwargs.get('default', None), + 'cli_flag': kwargs.get('cli_flag', None), + 'force_interactive': kwargs.get('force_interactive', False), + } display_util.assert_valid_call(*assert_args, **assert_kwargs) |