Skip to content

Commit

Permalink
Merge pull request #5283 from pierwill/pierwill-type-syntax-1
Browse files Browse the repository at this point in the history
Update syntax for type annotations
  • Loading branch information
rmol authored Jun 3, 2020
2 parents 4775539 + 4f8abad commit 1e39cd2
Showing 1 changed file with 3 additions and 6 deletions.
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

0 comments on commit 1e39cd2

Please sign in to comment.