File tree Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Expand file tree Collapse file tree 4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 11import sys
2-
32import git
43import manim as m
54import typer
65
6+ from typing import List
7+
78from git_sim .animations import handle_animations
89from git_sim .git_sim_base_command import GitSimBaseCommand
910from git_sim .settings import settings
1011
1112
1213class Add (GitSimBaseCommand ):
13- def __init__ (self , files : list [str ]):
14+ def __init__ (self , files : List [str ]):
1415 super ().__init__ ()
1516 self .hide_first_tag = True
1617 self .allow_no_commits = True
@@ -82,7 +83,7 @@ def populate_zones(
8283
8384
8485def add (
85- files : list [str ] = typer .Argument (
86+ files : List [str ] = typer .Argument (
8687 default = None ,
8788 help = "The names of one or more files to add to Git's staging area" ,
8889 )
Original file line number Diff line number Diff line change 11import sys
2-
32import manim as m
43import typer
54
5+ from typing import List
6+
67from git_sim .animations import handle_animations
78from git_sim .git_sim_base_command import GitSimBaseCommand
89from git_sim .settings import settings
910
1011
1112class Restore (GitSimBaseCommand ):
12- def __init__ (self , files : list [str ]):
13+ def __init__ (self , files : List [str ]):
1314 super ().__init__ ()
1415 self .hide_first_tag = True
1516 self .files = files
@@ -72,7 +73,7 @@ def populate_zones(
7273
7374
7475def restore (
75- files : list [str ] = typer .Argument (
76+ files : List [str ] = typer .Argument (
7677 default = None ,
7778 help = "The names of one or more files to restore" ,
7879 )
Original file line number Diff line number Diff line change 11import pathlib
2- from enum import Enum
32
3+ from enum import Enum
4+ from typing import List , Union
45from pydantic import BaseSettings
56
67
@@ -19,7 +20,7 @@ class Settings(BaseSettings):
1920 animate = False
2021 auto_open = True
2122 commits = 5
22- files : list [ pathlib .Path ] | None = None
23+ files : Union [ List [ pathlib .Path ], None ] = None
2324 hide_first_tag = False
2425 img_format : ImgFormat = ImgFormat .jpg
2526 INFO_STRING = "Simulating: git"
Original file line number Diff line number Diff line change 11import sys
2-
32import manim as m
43import typer
54
5+ from typing import List
6+
67from git_sim .animations import handle_animations
78from git_sim .git_sim_base_command import GitSimBaseCommand
89from git_sim .settings import settings
910
1011
1112class Stash (GitSimBaseCommand ):
12- def __init__ (self , files : list [str ]):
13+ def __init__ (self , files : List [str ]):
1314 super ().__init__ ()
1415 self .hide_first_tag = True
1516 self .files = files
@@ -80,7 +81,7 @@ def populate_zones(
8081
8182
8283def stash (
83- files : list [str ] = typer .Argument (
84+ files : List [str ] = typer .Argument (
8485 default = None ,
8586 help = "The name of the file to stash changes for" ,
8687 )
You can’t perform that action at this time.
0 commit comments