Skip to content

Commit 3effdd8

Browse files
CRUD operation for Project of Python TFE 1
1 parent 8c68e39 commit 3effdd8

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/tfe/utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
"""Basic utility functions for the TFE client."""
2-
31
from __future__ import annotations
42

53
import re
64
import time
75
from collections.abc import Callable
86

9-
# Pattern for validating string IDs
10-
_STRING_ID_PATTERN = re.compile(r"^[a-zA-Z0-9\-_]+$")
7+
_STRING_ID_PATTERN = re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_-]{2,}$")
118

129

1310
def poll_until(
@@ -26,7 +23,6 @@ def poll_until(
2623
time.sleep(interval_s)
2724

2825

29-
# Basic validation functions
3026
def valid_string(v: str | None) -> bool:
3127
return v is not None and str(v).strip() != ""
3228

0 commit comments

Comments
 (0)