@@ -22,7 +22,7 @@ def debug(self, message):
2222class UserSettingsManager (UserSettings ):
2323 def __init__ (
2424 self ,
25- project_name : Optional [ str ] = None ,
25+ project_name : str | None = None ,
2626 ) -> None :
2727 super ().__init__ (project_name , True )
2828 self .logger = ClickLogger ()
@@ -120,7 +120,7 @@ def settings():
120120
121121@click .command (name = "init" )
122122@click .option ("--project" , "-p" , required = False )
123- def init_settings (project : Optional [ str ] ):
123+ def init_settings (project : str | None ):
124124 """
125125 Initialize user settings for the current folder.
126126 If a project name is specified, it is used, otherwise a value is obtained
@@ -133,7 +133,7 @@ def init_settings(project: Optional[str]):
133133@click .argument ("key" )
134134@click .argument ("value" )
135135@click .option ("--project" , "-p" , required = False )
136- def set_value (key : str , value : str , project : Optional [ str ] ):
136+ def set_value (key : str , value : str , project : str | None ):
137137 """
138138 Set a setting in a user file by key and value.
139139 If a project name is specified, it is used, otherwise a value is obtained
@@ -151,7 +151,7 @@ def set_value(key: str, value: str, project: Optional[str]):
151151@click .command (name = "get" )
152152@click .argument ("key" )
153153@click .option ("--project" , "-p" , required = False )
154- def get_value (key : str , project : Optional [ str ] ):
154+ def get_value (key : str , project : str | None ):
155155 """
156156 Get a setting in a user file by key.
157157 If a project name is specified, it is used, otherwise a value is obtained
@@ -167,7 +167,7 @@ def get_value(key: str, project: Optional[str]):
167167@click .command (name = "set-many" )
168168@click .option ("--file" , help = "Input file" , type = click .File ("r" ), default = sys .stdin )
169169@click .option ("--project" , "-p" , required = False )
170- def set_many_values (file , project : Optional [ str ] ):
170+ def set_many_values (file , project : str | None ):
171171 """
172172 Set many settings, read from a JSON file passed through stdin.
173173 If a project name is specified, it is used, otherwise a value is obtained
@@ -188,7 +188,7 @@ def set_many_values(file, project: Optional[str]):
188188@click .command (name = "del" )
189189@click .argument ("key" )
190190@click .option ("--project" , "-p" , required = False )
191- def del_value (key : str , project : Optional [ str ] ):
191+ def del_value (key : str , project : str | None ):
192192 """
193193 Delete a setting for a project, by key.
194194 """
@@ -197,7 +197,7 @@ def del_value(key: str, project: Optional[str]):
197197
198198@click .command (name = "show" )
199199@click .option ("--project" , "-p" , required = False )
200- def show_settings (project : Optional [ str ] ):
200+ def show_settings (project : str | None ):
201201 """
202202 Show the local settings for a project.
203203 """
@@ -214,7 +214,7 @@ def list_groups():
214214
215215@click .command (name = "info" )
216216@click .option ("--project" , "-p" , required = False )
217- def show_info (project : Optional [ str ] ):
217+ def show_info (project : str | None ):
218218 """
219219 Show information about settings for a project.
220220 """
0 commit comments