Skip to content

Commit

Permalink
Remove unnecessary deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaltrusaitis-reef committed Nov 29, 2023
1 parent 9ca42db commit fcf4ffd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/unit/_cli/test_autocomplete_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from __future__ import annotations

import contextlib
import copy
import importlib
import io
import os
Expand Down Expand Up @@ -79,7 +78,7 @@ def _get_b2api_for_profile(profile: str):


def argcomplete_result():
parser = copy.deepcopy(b2.console_tool.B2.create_parser())
parser = b2.console_tool.B2.create_parser()
exit, output = Exit(), io.StringIO()
argcomplete.autocomplete(parser, exit_method=exit, output_stream=output)
return exit.code, output.getvalue()
Expand All @@ -93,7 +92,7 @@ def cached_complete_result(cache: autocomplete_cache.AutocompleteCache):

def uncached_complete_result(cache: autocomplete_cache.AutocompleteCache):
exit, output = Exit(), io.StringIO()
parser = copy.deepcopy(b2.console_tool.B2.create_parser())
parser = b2.console_tool.B2.create_parser()
cache.cache_and_autocomplete(
parser, uncached_args={
'exit_method': exit,
Expand Down

0 comments on commit fcf4ffd

Please sign in to comment.