Skip to content

Commit

Permalink
Avoid using an empty list as a default argument to a function (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
EeyoreLee committed Aug 23, 2023
1 parent e7f3501 commit f47bd6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bundled/tool/lsp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,15 @@ def _get_settings_by_document(document: workspace.Document | None):
def _run_tool_on_document(
document: workspace.Document,
use_stdin: bool = False,
extra_args: Sequence[str] = [],
extra_args: Optional[Sequence[str]] = None,
) -> utils.RunResult | None:
"""Runs tool on the given document.
if use_stdin is true then contents of the document is passed to the
tool via stdin.
"""
if extra_args is None:
extra_args = []
if str(document.uri).startswith("vscode-notebook-cell"):
# TODO: Decide on if you want to skip notebook cells.
# Skip notebook cells
Expand Down

0 comments on commit f47bd6a

Please sign in to comment.