-
-
Notifications
You must be signed in to change notification settings - Fork 654
formatting fixed #2372
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
formatting fixed #2372
Conversation
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.
Thanks a lot for the PR @louis-she !
I left few comments where we still need to remove trailing commas and rerun black.
Otherwise, you almost covered everything and that's very helpful to quickly finish the issue, great job !
EDIT:
There are also some line-length issues detected by flake8:
ignite/engine/engine.py:449:121: E501 line too long (121 > 120 characters)
ignite/distributed/utils.py:152:121: E501 line too long (121 > 120 characters)
let's fix them too
tests/ignite/contrib/metrics/regression/test_median_relative_absolute_error.py
Outdated
Show resolved
Hide resolved
tests/ignite/contrib/metrics/regression/test_median_relative_absolute_error.py
Outdated
Show resolved
Hide resolved
tests/ignite/contrib/metrics/regression/test_median_relative_absolute_error.py
Outdated
Show resolved
Hide resolved
|
@vfdev-5 comments were fixed, and changed all the black version to |
vfdev-5
left a comment
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.
Thanks a lot @louis-she !
tests/ignite/test_utils.py
Outdated
| """Docs are cool""" | ||
| return 24 | ||
|
|
||
| assert func_no_reasons.__doc__ == "**Deprecated function**.\n\n Docs are cool\n .. deprecated:: 0.4.2" |
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.
Tests are onw failing here as \n is removed in the docstring of func_no_reasons. Let's update expected result:
| assert func_no_reasons.__doc__ == "**Deprecated function**.\n\n Docs are cool\n .. deprecated:: 0.4.2" | |
| assert func_no_reasons.__doc__ == "**Deprecated function**.\n\n Docs are cool .. deprecated:: 0.4.2" |
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.
@louis-she below expected results are needed to be updated as well, but I'm not 100% sure if just removing "\n" is enough...
Can you try to execute this test locally :
pytest -vvv tests/ignite/test_utils.py::test_deprecated
|
@vfdev-5 fixed, we could trigger the CI again. |
I think other expected docs will fail, see my comment : #2372 (comment) |
Thanks! I rerun the tests and no worries about visdom it won't pass without its server setup. |
* Updated black to 21.12b0 and fixed codebase for others folders (#2367) * Updated black to 21.12b0 and fixed codebase for others folders * Updated black * formatting fixed (#2372) * fix: remove tailing commas that would mislead black formating * autopep8 fix * fix: left out tailing comma * chg: change black version * fix: test_deprecated assert failed with additional newline * fix: typo * fix: fix func_no_reasons test assert failed Co-authored-by: louis-she <louis-she@users.noreply.github.com> Co-authored-by: vfdev <vfdev.5@gmail.com> Co-authored-by: louis-she <louis-she@users.noreply.github.com>
* Updated black to 21.12b0 and fixed codebase for others folders (pytorch#2367) * Updated black to 21.12b0 and fixed codebase for others folders * Updated black * formatting fixed (pytorch#2372) * fix: remove tailing commas that would mislead black formating * autopep8 fix * fix: left out tailing comma * chg: change black version * fix: test_deprecated assert failed with additional newline * fix: typo * fix: fix func_no_reasons test assert failed Co-authored-by: louis-she <louis-she@users.noreply.github.com> Co-authored-by: vfdev <vfdev.5@gmail.com> Co-authored-by: louis-she <louis-she@users.noreply.github.com>

Related to #2366
Description:
Removed all the tailing comma that will mislead the black
Check list: