Skip to content

Commit

Permalink
don't format on init
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekaplan committed Dec 26, 2024
1 parent 3a792a1 commit dcaa1ca
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/prefect/runner/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
import subprocess
from copy import deepcopy
from pathlib import Path
from typing import Any, Dict, Optional, Protocol, TypedDict, Union, runtime_checkable
from typing import (
Any,
Dict,
List,
Optional,
Protocol,
TypedDict,
Union,
runtime_checkable,
)
from urllib.parse import urlparse, urlsplit, urlunparse
from uuid import uuid4

Expand Down Expand Up @@ -127,7 +136,6 @@ def __init__(
self._url = url
self._branch = branch
self._credentials = credentials
self._formatted_credentials = self._format_credentials()
self._include_submodules = include_submodules
repo_name = urlparse(url).path.split("/")[-1].replace(".git", "")
default_name = f"{repo_name}-{branch}" if branch else repo_name
Expand All @@ -147,7 +155,8 @@ def set_base_path(self, path: Path):
def pull_interval(self) -> Optional[int]:
return self._pull_interval

def _format_credentials(self) -> str:
@property
def _formatted_credentials(self) -> str:
credentials = (
self._credentials.model_dump()
if isinstance(self._credentials, Block)
Expand Down Expand Up @@ -179,7 +188,7 @@ def _repository_url_with_credentials(self) -> str:

return repository_url

def _git_config(self) -> list[str]:
def _git_config(self) -> List[str]:
"""
Build a git configuration to use when running git commands.
"""
Expand Down

0 comments on commit dcaa1ca

Please sign in to comment.