|
1 | 1 | import pathlib |
2 | | -from typing import List, Union |
| 2 | +from typing import List, Union, ClassVar |
3 | 3 |
|
4 | | -from pydantic import BaseSettings |
| 4 | +from pydantic_settings import BaseSettings |
5 | 5 |
|
6 | 6 | from git_sim.enums import StyleOptions, ColorByOptions, ImgFormat, VideoFormat |
7 | 7 |
|
8 | 8 |
|
9 | 9 | class Settings(BaseSettings): |
10 | | - allow_no_commits = False |
11 | | - animate = False |
12 | | - auto_open = True |
13 | | - n_default = 5 |
14 | | - n = 5 |
| 10 | + allow_no_commits: bool = False |
| 11 | + animate: bool = False |
| 12 | + auto_open: bool = True |
| 13 | + n_default: int = 5 |
| 14 | + n: int = 5 |
15 | 15 | files: Union[List[pathlib.Path], None] = None |
16 | | - hide_first_tag = False |
| 16 | + hide_first_tag: bool = False |
17 | 17 | img_format: ImgFormat = ImgFormat.JPG |
18 | | - INFO_STRING = "Simulating: git" |
19 | | - light_mode = False |
20 | | - transparent_bg = False |
21 | | - logo = pathlib.Path(__file__).parent.resolve() / "logo.png" |
22 | | - low_quality = False |
23 | | - max_branches_per_commit = 1 |
24 | | - max_tags_per_commit = 1 |
25 | | - media_dir = pathlib.Path().cwd() |
26 | | - outro_bottom_text = "Learn more at initialcommit.com" |
27 | | - outro_top_text = "Thanks for using Initial Commit!" |
28 | | - reverse = False |
29 | | - show_intro = False |
30 | | - show_outro = False |
31 | | - speed = 1.5 |
32 | | - title = "Git-Sim, by initialcommit.com" |
| 18 | + INFO_STRING: str = "Simulating: git" |
| 19 | + light_mode: bool = False |
| 20 | + transparent_bg: bool = False |
| 21 | + logo: pathlib.Path = pathlib.Path(__file__).parent.resolve() / "logo.png" |
| 22 | + low_quality: bool = False |
| 23 | + max_branches_per_commit: int = 1 |
| 24 | + max_tags_per_commit: int = 1 |
| 25 | + media_dir: pathlib.Path = pathlib.Path().cwd() |
| 26 | + outro_bottom_text: str = "Learn more at initialcommit.com" |
| 27 | + outro_top_text: str = "Thanks for using Initial Commit!" |
| 28 | + reverse: bool = False |
| 29 | + show_intro: bool = False |
| 30 | + show_outro: bool = False |
| 31 | + speed: float = 1.5 |
| 32 | + title: str = "Git-Sim, by initialcommit.com" |
33 | 33 | video_format: VideoFormat = VideoFormat.MP4 |
34 | | - stdout = False |
35 | | - output_only_path = False |
36 | | - quiet = False |
37 | | - invert_branches = False |
38 | | - hide_merged_branches = False |
39 | | - all = False |
| 34 | + stdout: bool = False |
| 35 | + output_only_path: bool = False |
| 36 | + quiet: bool = False |
| 37 | + invert_branches: bool = False |
| 38 | + hide_merged_branches: bool = False |
| 39 | + all: bool = False |
40 | 40 | color_by: Union[ColorByOptions, None] = None |
41 | | - highlight_commit_messages = False |
| 41 | + highlight_commit_messages: bool = False |
42 | 42 | style: Union[StyleOptions, None] = StyleOptions.CLEAN |
43 | 43 |
|
44 | 44 | class Config: |
|
0 commit comments