Skip to content

Commit

Permalink
Optimized imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jsikorski committed Oct 10, 2023
1 parent 210c03b commit a538207
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions performance_history_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from timeit import default_timer as timer
from typing import Optional, List, Tuple

import git

import typer
from git import Commit
from git import Commit, Repo
from rich import print


Expand Down Expand Up @@ -64,7 +64,7 @@ def _print_summary_performance_descending(
def _analyse_performance_history(
rev: str, limit_commits: int, sample_amount: int, print_all_results: bool
):
repo = git.Repo()
repo = Repo()
active_branch = repo.active_branch

commits_with_results: List[Tuple[Commit, float]] = []
Expand Down
3 changes: 2 additions & 1 deletion src/snowcli/cli/nativeapp/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tempfile import TemporaryDirectory
from click.exceptions import ClickException
from shutil import move, rmtree
from git import Repo
from strictyaml import load, as_document


Expand Down Expand Up @@ -202,6 +201,7 @@ def _init_with_url_and_no_template(
Returns:
None
"""
from git import Repo

target_directory: Optional[Path] = None
try:
Expand Down Expand Up @@ -253,6 +253,7 @@ def _init_with_url_and_template(
Returns:
None
"""
from git import Repo

path_to_project: Optional[Path] = None
try:
Expand Down
2 changes: 1 addition & 1 deletion src/snowcli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import subprocess
import sys
import warnings
import git


from typing import Dict, List, Literal, Optional, Generic, TypeVar, Callable
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

@pytest.mark.performance
def test_snow_help_performance():

results = []
for _ in range(SAMPLE_AMOUNT):
start = timer()
Expand Down

0 comments on commit a538207

Please sign in to comment.