Skip to content

Commit 29ef108

Browse files
Make lint
1 parent 26d6cd1 commit 29ef108

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/datacustomcode/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ def deploy(
208208
network: str,
209209
sf_cli_org: Optional[str],
210210
):
211+
from datacustomcode.constants import USE_IN_FEATURE_MAPPING_FOR_CONNECT_API
211212
from datacustomcode.deploy import (
212213
COMPUTE_TYPES,
213-
USE_IN_FEATURE_MAPPING_FOR_CONNECT_API,
214214
CodeExtensionMetadata,
215215
deploy_full,
216216
infer_use_in_feature,

src/datacustomcode/function_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def get_type_name(type_annotation: Any) -> Optional[str]:
7979
return None
8080

8181
if hasattr(type_annotation, "__name__"):
82-
return type_annotation.__name__
82+
return str(type_annotation.__name__)
8383

8484
return str(type_annotation)
8585

@@ -230,14 +230,14 @@ def inspect_function_types(
230230
return None, None
231231

232232

233-
def get_request_type(entrypoint_path: str) -> Optional[Any]:
233+
def get_request_type(entrypoint_path: str) -> Any:
234234
"""Get the request type annotation from a function entrypoint.
235235
236236
Args:
237237
entrypoint_path: Path to the entrypoint.py file
238238
239239
Returns:
240-
The request type (Pydantic model class), or None if not found
240+
The request type (Pydantic model class)
241241
242242
Raises:
243243
ImportError: If the module cannot be loaded

src/datacustomcode/template.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515
import os
1616
import shutil
17+
from typing import Optional
1718

1819
from loguru import logger
1920

@@ -39,7 +40,7 @@ def copy_script_template(target_dir: str) -> None:
3940
shutil.copy2(source, destination)
4041

4142

42-
def copy_function_template(target_dir: str, use_in_feature: str) -> None:
43+
def copy_function_template(target_dir: str, use_in_feature: Optional[str]) -> None:
4344
os.makedirs(target_dir, exist_ok=True)
4445

4546
# First, copy common files from base function template

0 commit comments

Comments
 (0)