mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-10 11:47:51 +02:00
update comments
This commit is contained in:
@@ -943,6 +943,11 @@ def deploy(
|
||||
|
||||
|
||||
def _normalize_image_name(value: str | None) -> str:
|
||||
"""Sanitize a deployment/directory name into a valid Docker repository name.
|
||||
|
||||
Docker repository names must be lowercase and may only contain
|
||||
[a-z0-9._-]. Invalid characters are replaced with hyphens.
|
||||
"""
|
||||
if not value:
|
||||
return "app"
|
||||
slug = re.sub(r"[^a-z0-9._-]+", "-", value.lower()).strip("-.")
|
||||
@@ -950,6 +955,10 @@ def _normalize_image_name(value: str | None) -> str:
|
||||
|
||||
|
||||
def _normalize_image_tag(value: str) -> str:
|
||||
"""Validate and return a Docker image tag.
|
||||
|
||||
Tags may only contain [A-Za-z0-9_.-]. Defaults to "latest" when empty.
|
||||
"""
|
||||
if not value:
|
||||
value = "latest"
|
||||
if not re.fullmatch(r"[A-Za-z0-9_.-]+", value):
|
||||
|
||||
@@ -16,6 +16,7 @@ class Progress:
|
||||
self.message = message
|
||||
self._base_message = message
|
||||
self._show_elapsed = elapsed
|
||||
# use this to make sure we don't kill thread when we set msg to ""
|
||||
self._stop = threading.Event()
|
||||
self.spinner_generator = self.spinning_cursor()
|
||||
|
||||
@@ -52,6 +53,7 @@ class Progress:
|
||||
sys.stdout.write(next(self.spinner_generator) + " " + message)
|
||||
sys.stdout.flush()
|
||||
time.sleep(self.delay)
|
||||
# clear the spinner and message
|
||||
sys.stdout.write(
|
||||
"\b" * (len(message) + 2)
|
||||
+ " " * (len(message) + 2)
|
||||
|
||||
Reference in New Issue
Block a user