-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
Add informations on cli output about module when fact or operation was not found #1244
base: 3.x
Are you sure you want to change the base?
Add informations on cli output about module when fact or operation was not found #1244
Conversation
"No such attribute in module server: NotAFact", | ||
( | ||
"No such attribute in module server: NotAFact\n" | ||
"Available facts in module are: User, Home, Path, TmpDir, Hostname, Kernel, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each update will implies an updtate of the test, maybe use a regex slould be better?
6936791
to
fce49ad
Compare
It does not work as expected for operations in case of misspelling |
fce49ad
to
b89c2f4
Compare
If the operation or fact is not found, it will display the ones available, and if no one is avaible, Warn the user about the possibility that he have a py file or a folder with the same name as the module
Use of regex to avoid having to update the cli tests each time the operations and facts used in them are modified
b89c2f4
to
8b752b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maisim this is awesome! Really big QoL improvement.
It does not work as expected for operations in case of misspelling
What do you mean by this? I'll have a play around with the branch when I get the chance, just wondering.
Hello folks,
If the operation or fact was not found, it will display the ones available, and if no one is available, Warn the user about the possibility that he have a py file or a folder with the same name as the module
If you have a directory wich have the same name as the pyinfra module you want to use, pyinfra will try to look inside form the operations/facts (wich seems to be the wanted behavior)
So I added a message to inform about this possibility if the module/fact is not found:
In the same time I added this:
This is a suggestion, tell me what you think.