Skip to content

Typing Error on Python 3.9 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
abhishek9sharma opened this issue May 21, 2025 · 0 comments
Open

Typing Error on Python 3.9 #10

abhishek9sharma opened this issue May 21, 2025 · 0 comments

Comments

@abhishek9sharma
Copy link

abhishek9sharma commented May 21, 2025

https://github.com/guardrails-ai/guardrails_pii/blob/main/validator/main.py#L77

Above line gives below error on python3.9

  File "/home/abc/ENTER/envs/gr_env/lib/python3.9/site-packages/guardrails_grhub_guardrails_pii/main.py", line 77, in GuardrailsPII
    entities: str | List[str],
TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'

I think can be updated to below

entities: Union[str, List[str]],

Let me know if it makes sense and I will raise a PR @CalebCourier @zsimjee

@abhishek9sharma abhishek9sharma changed the title Typing f Typing Error on Python 3.9 May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant