Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qTipTip authored and haakonvt committed Sep 5, 2024
1 parent b23275e commit 2cf17ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ Changes are grouped as follows
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## 7.58.7 - 2024-09-05

## [7.58.7] - 2024-09-05
### Fixed
- Allow zipping files older than 1980 when creating a function, this is done by
setting the timestamp to 1980 if older than that.
Expand Down
6 changes: 2 additions & 4 deletions cognite/client/_api/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,10 @@ def _validate_function_handle(handle_obj: Callable | ast.FunctionDef) -> None:
accepts_args = set(signature(handle_obj).parameters)

if name != "handle":
raise TypeError(f"Function is named '{
name}' but must be named 'handle'.")
raise TypeError(f"Function is named '{name}' but must be named 'handle'.")

if not accepts_args <= ALLOWED_HANDLE_ARGS:
raise TypeError(f"Arguments {accepts_args} to the function must be a subset of {
ALLOWED_HANDLE_ARGS}.")
raise TypeError(f"Arguments {accepts_args} to the function must be a subset of {ALLOWED_HANDLE_ARGS}.")


def _extract_requirements_from_file(file_name: str) -> list[str]:
Expand Down

0 comments on commit 2cf17ec

Please sign in to comment.