66
77
88class OptionParserUsersMixin (OptionParser ):
9- def parse_owner_spec (self , owner_spec : str ) -> tuple [int | None , int | None ]:
9+ def parse_owner_spec (self , owner_spec : str , / ) -> tuple [int | None , int | None ]:
1010 """
1111 Accept a string in the form ``[USER][:[GROUP]]`` and return the UID and GID.
1212 Either or both may be None if omitted from the input string.
@@ -26,7 +26,7 @@ def parse_owner_spec(self, owner_spec: str) -> tuple[int | None, int | None]:
2626 return uid , gid
2727
2828 # pylint: disable=inconsistent-return-statements
29- def parse_user (self , user : str ) -> int :
29+ def parse_user (self , user : str , / ) -> int :
3030 """
3131 Accept a string representing a username or UID and return the UID.
3232 An appropriate parser error is thrown if obtaining the UID fails.
@@ -40,7 +40,7 @@ def parse_user(self, user: str) -> int:
4040 self .error (f"invalid user: { user } " )
4141
4242 # pylint: disable=inconsistent-return-statements
43- def parse_group (self , group : str ) -> int :
43+ def parse_group (self , group : str , / ) -> int :
4444 """
4545 Accept a string representing a group name or GID and return the GID.
4646 An appropriate parser error is thrown if obtaining the GID fails.
@@ -55,15 +55,15 @@ def parse_group(self, group: str) -> int:
5555
5656
5757@functools .lru_cache (1000 )
58- def user_display_name_from_id (uid : int ) -> str :
58+ def user_display_name_from_id (uid : int , / ) -> str :
5959 try :
6060 return pwd .getpwuid (uid ).pw_name
6161 except KeyError :
6262 return str (uid )
6363
6464
6565@functools .lru_cache (1000 )
66- def group_display_name_from_id (gid : int ) -> str :
66+ def group_display_name_from_id (gid : int , / ) -> str :
6767 try :
6868 return grp .getgrgid (gid ).gr_name
6969 except KeyError :
0 commit comments