Skip to content

Commit

Permalink
add type hint to acl.py to enforce str() members of run_command() args
Browse files Browse the repository at this point in the history
  • Loading branch information
phillxnet committed Mar 22, 2024
1 parent 4387b1a commit 86abaa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rockstor/system/acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
CHMOD = "/usr/bin/chmod"


def chown(share, owner, group=None, recursive=False):
cmd = [
def chown(share: str, owner: str, group: str | None = None, recursive: bool = False):
cmd: list[str] = [
CHOWN,
]
if recursive is True:
Expand All @@ -34,8 +34,8 @@ def chown(share, owner, group=None, recursive=False):
return run_command(cmd)


def chmod(share, perm_bits, recursive=False):
cmd = [
def chmod(share: str, perm_bits: str, recursive: bool = False):
cmd: list[str] = [
CHMOD,
]
if recursive is True:
Expand Down

0 comments on commit 86abaa7

Please sign in to comment.