You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run nox in a directory with no noxfile.py you get a scary looking exception:
This is clearly the intended behaviour as using nox without a noxfile is a bit of a non-starter to say the least, and most people could easily figure out what it's trying to tell you, but this traceback is somewhat distracting and slightly off-putting (especially to newer python developers).
A friendlier message could just provide a nicer experience for people new to this whole thing.
Describe the solution you'd like
If nox hits a FileNotFoundError whilst trying to load noxfile.py it could instead return a friendlier log message without the traceback along the lines of "no noxfile.py found in current directory, create one and try again." with maybe a link to the docs or something like that?
It could perhaps even generate a "hello world" style placeholder noxfile along the lines of:
importnox@nox.sessiondefhello(session: nox.Session):
""" Your first nox session! """session.log("Hello world!")
But that might be unnecessary I don't know, keen for maintainers input here!
This seems pretty simple to implement and I'd be more than happy to submit a PR if this is something you'd like?
Thanks!
The text was updated successfully, but these errors were encountered:
How would this feature be useful?
If you run nox in a directory with no
noxfile.py
you get a scary looking exception:This is clearly the intended behaviour as using nox without a noxfile is a bit of a non-starter to say the least, and most people could easily figure out what it's trying to tell you, but this traceback is somewhat distracting and slightly off-putting (especially to newer python developers).
A friendlier message could just provide a nicer experience for people new to this whole thing.
Describe the solution you'd like
If nox hits a
FileNotFoundError
whilst trying to loadnoxfile.py
it could instead return a friendlier log message without the traceback along the lines of "no noxfile.py found in current directory, create one and try again." with maybe a link to the docs or something like that?It could perhaps even generate a "hello world" style placeholder noxfile along the lines of:
But that might be unnecessary I don't know, keen for maintainers input here!
This seems pretty simple to implement and I'd be more than happy to submit a PR if this is something you'd like?
Thanks!
The text was updated successfully, but these errors were encountered: