Skip to content
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

[Docs] No declarations of type Name and Description on Docs injection sample #246

Closed
np-kyokyo opened this issue Jan 23, 2024 · 1 comment

Comments

@np-kyokyo
Copy link
Contributor

np-kyokyo commented Jan 23, 2024

https://injector.readthedocs.io/en/stable/terminology.html

I was trying out the code in the terminology section of the sample above , but there was no description of how we should specifically declare type Name and Description, which took me a bit of time.
Finally, I found out that it works fine by declaring them as:

from typing import NewType

Name = NewType("Name", str)
Description = NewType("Description", str)

(ref.#144)

But, I feel that this should be written in the Injection section of the sample.

@davidparsson
Copy link
Collaborator

Thanks @np-kyokyo, that sounds reasonable. Are you willing to open a pull request with those changes?

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

2 participants