Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update syntax for type annotations #5283

Merged
merged 1 commit into from
Jun 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions securedrop/rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import subprocess


def shred(path, delete=True):
# type: (str, bool) -> None
def shred(path: str, delete: bool = True) -> None:
"""
Run shred on the file at the given path.

Expand Down Expand Up @@ -51,8 +50,7 @@ def shred(path, delete=True):
subprocess.check_call(cmd)


def secure_delete(path):
# type: (str) -> None
def secure_delete(path: str) -> None:
"""
Securely deletes the file at ``path``.

Expand Down Expand Up @@ -87,8 +85,7 @@ def secure_delete(path):
os.rmdir(d)


def check_secure_delete_capability():
# type: () -> bool
def check_secure_delete_capability() -> bool:
"""
Checks the availability of the program we use for secure deletion.

Expand Down