File tree 4 files changed +15
-11
lines changed
4 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
1
import sys
2
-
3
2
import git
4
3
import manim as m
5
4
import typer
6
5
6
+ from typing import List
7
+
7
8
from git_sim .animations import handle_animations
8
9
from git_sim .git_sim_base_command import GitSimBaseCommand
9
10
from git_sim .settings import settings
10
11
11
12
12
13
class Add (GitSimBaseCommand ):
13
- def __init__ (self , files : list [str ]):
14
+ def __init__ (self , files : List [str ]):
14
15
super ().__init__ ()
15
16
self .hide_first_tag = True
16
17
self .allow_no_commits = True
@@ -82,7 +83,7 @@ def populate_zones(
82
83
83
84
84
85
def add (
85
- files : list [str ] = typer .Argument (
86
+ files : List [str ] = typer .Argument (
86
87
default = None ,
87
88
help = "The names of one or more files to add to Git's staging area" ,
88
89
)
Original file line number Diff line number Diff line change 1
1
import sys
2
-
3
2
import manim as m
4
3
import typer
5
4
5
+ from typing import List
6
+
6
7
from git_sim .animations import handle_animations
7
8
from git_sim .git_sim_base_command import GitSimBaseCommand
8
9
from git_sim .settings import settings
9
10
10
11
11
12
class Restore (GitSimBaseCommand ):
12
- def __init__ (self , files : list [str ]):
13
+ def __init__ (self , files : List [str ]):
13
14
super ().__init__ ()
14
15
self .hide_first_tag = True
15
16
self .files = files
@@ -72,7 +73,7 @@ def populate_zones(
72
73
73
74
74
75
def restore (
75
- files : list [str ] = typer .Argument (
76
+ files : List [str ] = typer .Argument (
76
77
default = None ,
77
78
help = "The names of one or more files to restore" ,
78
79
)
Original file line number Diff line number Diff line change 1
1
import pathlib
2
- from enum import Enum
3
2
3
+ from enum import Enum
4
+ from typing import List , Union
4
5
from pydantic import BaseSettings
5
6
6
7
@@ -19,7 +20,7 @@ class Settings(BaseSettings):
19
20
animate = False
20
21
auto_open = True
21
22
commits = 5
22
- files : list [ pathlib .Path ] | None = None
23
+ files : Union [ List [ pathlib .Path ], None ] = None
23
24
hide_first_tag = False
24
25
img_format : ImgFormat = ImgFormat .jpg
25
26
INFO_STRING = "Simulating: git"
Original file line number Diff line number Diff line change 1
1
import sys
2
-
3
2
import manim as m
4
3
import typer
5
4
5
+ from typing import List
6
+
6
7
from git_sim .animations import handle_animations
7
8
from git_sim .git_sim_base_command import GitSimBaseCommand
8
9
from git_sim .settings import settings
9
10
10
11
11
12
class Stash (GitSimBaseCommand ):
12
- def __init__ (self , files : list [str ]):
13
+ def __init__ (self , files : List [str ]):
13
14
super ().__init__ ()
14
15
self .hide_first_tag = True
15
16
self .files = files
@@ -80,7 +81,7 @@ def populate_zones(
80
81
81
82
82
83
def stash (
83
- files : list [str ] = typer .Argument (
84
+ files : List [str ] = typer .Argument (
84
85
default = None ,
85
86
help = "The name of the file to stash changes for" ,
86
87
)
You can’t perform that action at this time.
0 commit comments