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

Allow for calling inject directly, without Typer #22

Open
jacobeatsspam opened this issue Jul 22, 2024 · 2 comments
Open

Allow for calling inject directly, without Typer #22

jacobeatsspam opened this issue Jul 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jacobeatsspam
Copy link

    inject(Path("models/README.md"))
paracelsus/cli.py", line 181, in inject
    format=format.value,
           ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'value'

The issue is that the default uses Formats.mermaid.value and then again, .value is attempted to be used below.

If I can propose a fix, set the default to the correct type, Formats.mermaid.

@tedivm tedivm added the bug Something isn't working label Jul 23, 2024
@tedivm
Copy link
Owner

tedivm commented Aug 8, 2024

Pushing it to .value is a direct work around for another bug, where if you reference the field itself then the help documentation ends up being wrong.

Is your goal to allow the function to be called without the typer interface? As in, you want to programmatically call those functions?

@tedivm tedivm changed the title Calling inject directly, without Typer, results in error Allow for calling inject directly, without Typer Aug 8, 2024
@tedivm tedivm added enhancement New feature or request and removed bug Something isn't working labels Aug 8, 2024
@jacobeatsspam
Copy link
Author

jacobeatsspam commented Aug 20, 2024

Is your goal to allow the function to be called without the typer interface? As in, you want to programmatically call those functions?

Bingo. And I arrived at this need because #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants