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

improve user experience by complaining when reload_dirs is given a string instead of a list #976

Closed
max-l opened this issue Mar 5, 2021 · 1 comment · Fixed by #978
Closed

Comments

@max-l
Copy link

max-l commented Mar 5, 2021

Passing a string to reload_dirs as in the following, causes reload to silently not work :

    uvicorn.run(
        "dp.server:app",
        host="127.0.0.1", port=5000,
        log_level="info",
        reload=True,
        reload_dirs="/home/maxou/dev/proj",
        reload_delay=2.0
    )

Giving reload_dirs an array : ["/home/maxou/dev/proj"] fixes the problem

It's not really a bug, but complaining with an error message would improve the user experience.

@euri10
Copy link
Member

euri10 commented Mar 6, 2021

definitely something that could be improved and that would have been detected by mypy I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants