Skip to content

Instantly share code, notes, and snippets.

@skylarbpayne
Created June 18, 2025 06:40
Show Gist options
  • Save skylarbpayne/a0b15c1d7b1d3394237591441ccb2856 to your computer and use it in GitHub Desktop.
Save skylarbpayne/a0b15c1d7b1d3394237591441ccb2856 to your computer and use it in GitHub Desktop.
Human Layer String Errors Minimal Reproduction
# /// 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