Skip to content

Commit

Permalink
Remove a few unused "type: ignore" comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jkarasti committed Dec 13, 2024
1 parent bbb4d42 commit 5977251
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dangerzone/gui/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def open_pdf_viewer(self, filename: str) -> None:
subprocess.run(args)

elif platform.system() == "Windows":
os.startfile(Path(filename)) # type: ignore [attr-defined]
os.startfile(Path(filename))

elif platform.system() == "Linux":
# Get the PDF reader command
Expand Down
4 changes: 2 additions & 2 deletions dangerzone/isolation_provider/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

# Define startupinfo for subprocesses
if platform.system() == "Windows":
startupinfo = subprocess.STARTUPINFO() # type: ignore [attr-defined]
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW # type: ignore [attr-defined]
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
else:
startupinfo = None

Expand Down
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_get_resource_path() -> None:
@pytest.mark.skipif(platform.system() != "Windows", reason="Windows-specific")
def test_get_subprocess_startupinfo() -> None:
startupinfo = util.get_subprocess_startupinfo()
assert isinstance(startupinfo, subprocess.STARTUPINFO) # type: ignore[attr-defined]
assert isinstance(startupinfo, subprocess.STARTUPINFO)


def test_replace_control_chars(uncommon_text: str, sanitized_text: str) -> None:
Expand Down

0 comments on commit 5977251

Please sign in to comment.