Skip to content

Commit 053c3a0

Browse files
committed
chore: ConfigPath: Use type annotations for constructor
1 parent a69627c commit 053c3a0

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

tmuxp/cli/utils.py

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import os
3+
import typing as t
34

45
import click
56
from click.exceptions import FileError
@@ -84,8 +85,30 @@ def func(value):
8485

8586

8687
class ConfigPath(click.Path):
87-
def __init__(self, config_dir=None, *args, **kwargs):
88-
super().__init__(*args, **kwargs)
88+
def __init__(
89+
self,
90+
config_dir=None,
91+
exists: bool = False,
92+
file_okay: bool = True,
93+
dir_okay: bool = True,
94+
writable: bool = False,
95+
readable: bool = True,
96+
resolve_path: bool = False,
97+
allow_dash: bool = False,
98+
path_type: t.Optional[t.Type] = None,
99+
executable: bool = False,
100+
):
101+
super().__init__(
102+
exists=exists,
103+
file_okay=file_okay,
104+
dir_okay=dir_okay,
105+
writable=writable,
106+
readable=readable,
107+
resolve_path=resolve_path,
108+
allow_dash=allow_dash,
109+
path_type=path_type,
110+
executable=executable,
111+
)
89112
self.config_dir = config_dir
90113

91114
def convert(self, value, param, ctx):

0 commit comments

Comments
 (0)