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
Change warnings to python standard #4673
Conversation
replaced many `logger.warnings` with `warnings.warn`, replaced some `.format` with f-strings
@wochinge this is a WIP because it should only be merged together with additional changes, however it definitely does need review at this stage. |
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.
Wow! Great work in applying these best practices to our code base!
We can also do that incrementally. So merge this and then do another PR for the rest?
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
typos and f-strings messed up by black Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Actually this should be everything (up to the date I created this PR), I looked at every instance of |
Awesome, I think there is one more open comment, but otherwise we are good 👍 |
@imLew can you please update this PR with latest master and please let Tobias know when this is ready for another review |
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.
Left a couple of suggestions and two warnings correction, but ready to be merged for me 🚀 The warnings assertion in the tests look cool 💯
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Co-Authored-By: Tobias Wochinger <t.wochinger@rasa.com>
Proposed changes:
warnings.warn
should be used for warnings that the user needs to address whilelogger.warning
should be used for warnings that the user should be aware of but cannot change themselves."".format
See #4356
The next step will be to apply
pytest.mark.filterwarnings
to all those tests raisingwarnings.warn
; but this should be merged firstStatus (please check what you already did):
black
(please check Readme for instructions)