Created
June 18, 2025 06:40
-
-
Save skylarbpayne/a0b15c1d7b1d3394237591441ccb2856 to your computer and use it in GitHub Desktop.
Human Layer String Errors Minimal Reproduction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "humanlayer==0.7.9", | |
# "pydantic==2.11.5", | |
# ] | |
# /// | |
import humanlayer | |
from datetime import date | |
from pydantic import BaseModel | |
hl = humanlayer.HumanLayer(verbose=True) | |
class User(BaseModel): | |
name: str | |
age: int | |
dob: date | |
@hl.require_approval() | |
def approve_fn(x: User) -> User: | |
return x | |
if __name__ == "__main__": | |
user = User(name="John Doe", age=25, dob=date(1990, 1, 1)) | |
print(approve_fn(x=user)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment