Skip to content

Commit 7008374

Browse files
Format with black
Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
1 parent 69e2d6c commit 7008374

File tree

10 files changed

+23
-29
lines changed

10 files changed

+23
-29
lines changed

src/git_sim/clone.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ def construct(self):
4747
sys.exit(1)
4848

4949
if self.url == os.path.join(self.path, repo_name):
50-
print(
51-
f"git-sim error: Cannot clone into same path, please try again"
52-
)
50+
print(f"git-sim error: Cannot clone into same path, please try again")
5351
sys.exit(1)
5452
new_dir = os.path.join(tempfile.gettempdir(), "git_sim", repo_name)
5553

src/git_sim/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, settings: List[str]):
2626

2727
for i, setting in enumerate(self.settings):
2828
if " " in setting:
29-
self.settings[i] = f"\"{setting}\""
29+
self.settings[i] = f'"{setting}"'
3030

3131
self.cmd += f"{type(self).__name__.lower()} {' '.join(self.settings)}"
3232

@@ -35,9 +35,9 @@ def construct(self):
3535
print(f"{settings.INFO_STRING} {self.cmd}")
3636

3737
self.show_intro()
38-
#self.recenter_frame()
39-
#self.scale_frame()
40-
#self.add_details(repo_name)
38+
# self.recenter_frame()
39+
# self.scale_frame()
40+
# self.add_details(repo_name)
4141
self.show_command_as_title()
4242
self.fadeout()
4343
self.show_outro()

src/git_sim/git_sim_base_command.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,18 +476,15 @@ def draw_branch(self, commit, i, make_branches_remote=False):
476476

477477
for branch in branches:
478478
if (
479-
branch not in remote_tracking_branches # local branch
479+
branch not in remote_tracking_branches # local branch
480480
and commit.hexsha == self.repo.heads[branch].commit.hexsha
481481
) or (
482-
branch in remote_tracking_branches # remote tracking branch
482+
branch in remote_tracking_branches # remote tracking branch
483483
and commit.hexsha == remote_tracking_branches[branch]
484484
):
485485
text = (
486486
(make_branches_remote + "/" + branch)
487-
if (
488-
make_branches_remote
489-
and branch not in remote_tracking_branches
490-
)
487+
if (make_branches_remote and branch not in remote_tracking_branches)
491488
else branch
492489
)
493490

@@ -1361,7 +1358,9 @@ def add_ref_to_drawn_refs_by_commit(self, hexsha, ref):
13611358
try:
13621359
self.drawnRefsByCommit[hexsha].append(ref)
13631360
except KeyError:
1364-
self.drawnRefsByCommit[hexsha] = [ref,]
1361+
self.drawnRefsByCommit[hexsha] = [
1362+
ref,
1363+
]
13651364

13661365

13671366
class DottedLine(m.Line):

src/git_sim/init.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def construct(self):
3030
print(f"{settings.INFO_STRING} {self.cmd}")
3131

3232
self.show_intro()
33-
#self.recenter_frame()
34-
#self.scale_frame()
35-
#self.add_details(repo_name)
33+
# self.recenter_frame()
34+
# self.scale_frame()
35+
# self.add_details(repo_name)
3636
self.show_command_as_title()
3737
self.fadeout()
3838
self.show_outro()

src/git_sim/push.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717

1818
class Push(GitSimBaseCommand):
19-
def __init__(self, remote: str = None, branch: str = None, set_upstream: bool = False):
19+
def __init__(
20+
self, remote: str = None, branch: str = None, set_upstream: bool = False
21+
):
2022
super().__init__()
2123
self.remote = remote
2224
self.branch = branch

src/git_sim/remote.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ def construct(self):
3232
print(f"{settings.INFO_STRING} {self.cmd}")
3333

3434
self.show_intro()
35-
#self.recenter_frame()
36-
#self.scale_frame()
37-
#self.add_details(repo_name)
35+
# self.recenter_frame()
36+
# self.scale_frame()
37+
# self.add_details(repo_name)
3838
self.show_command_as_title()
3939
self.fadeout()
4040
self.show_outro()

src/git_sim/reset.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def build_commit_id_and_message(self, commit, i):
6666
elif i == 3 and self.resetTo.hexsha not in [
6767
c.hexsha for c in self.get_default_commits()
6868
]:
69-
commitId = m.Text(
70-
"...", font=self.font, font_size=20, color=self.fontColor
71-
)
69+
commitId = m.Text("...", font=self.font, font_size=20, color=self.fontColor)
7270
commitMessage = "..."
7371
hide_refs = True
7472
elif i == 4 and self.resetTo.hexsha not in [

src/git_sim/revert.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ def build_commit_id_and_message(self, commit, i):
6565
elif i == 2 and self.revert.hexsha not in [
6666
commit.hexsha for commit in self.get_default_commits()
6767
]:
68-
commitId = m.Text(
69-
"...", font=self.font, font_size=20, color=self.fontColor
70-
)
68+
commitId = m.Text("...", font=self.font, font_size=20, color=self.fontColor)
7169
commitMessage = "..."
7270
hide_refs = True
7371
elif i == 3 and self.revert.hexsha not in [

src/git_sim/tag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def construct(self):
6161
height=0.4,
6262
width=tagText.width + 0.25,
6363
)
64-
64+
6565
if self.commit:
6666
commit = self.repo.commit(self.commit)
6767
try:

tests/e2e_tests/test_core_commands.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"git-sim restore",
2424
"git-sim stash",
2525
"git-sim status",
26-
2726
# Complex commands.
2827
"git-sim branch new_branch",
2928
"git-sim checkout branch2",

0 commit comments

Comments
 (0)