If ament_pep257 encounters an error that is not a pydocstyle.violations.Error type, the program will crash during the xunit file generation step because it expects a numeric line number to be given for each error and that field returns a '-' string in the failing case. One easy way I found to reproduce this is to run the tool on some python2 syntax that is invalid in python3:
test.py
def class Hello(object):
def __init__(self):
print('hello world!')
def main():
hey = Hello()
if __name__ == '__main__':
main()
Then run:
ament_pep257 --xunit-file test-xunit test.py
Should complain about a print string formatting and not fully generate the xml file output.
If ament_pep257 encounters an error that is not a
pydocstyle.violations.Error
type, the program will crash during the xunit file generation step because it expects a numeric line number to be given for each error and that field returns a '-' string in the failing case. One easy way I found to reproduce this is to run the tool on some python2 syntax that is invalid in python3:test.py
Then run:
ament_pep257 --xunit-file test-xunit test.py
Should complain about a print string formatting and not fully generate the xml file output.
OS: Ubuntu 22.04 Distro: Humble