Doing as I am told :)
ERROR: Unrecoverable exception thrown when parsing src/eduid_webapp/eidas/app.py! This should NEVER happen.
If encountered, please open an issue: https://github.com/PyCQA/isort/issues/new
Traceback (most recent call last):
File "/home/lundberg/python-environments/eduid-webapp/bin/isort", line 8, in <module>
sys.exit(main())
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/main.py", line 953, in main
for sort_attempt in attempt_iterator:
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/main.py", line 939, in <genexpr>
sort_imports( # type: ignore
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/main.py", line 95, in sort_imports
incorrectly_sorted = not api.sort_file(
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/api.py", line 324, in sort_file
changed = sort_stream(
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/api.py", line 158, in sort_stream
changed = core.process(
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/core.py", line 332, in process
parsed_content = parse.file_contents(import_section, config=config)
File "/home/lundberg/python-environments/eduid-webapp/lib/python3.8/site-packages/isort/parse.py", line 432, in file_contents
root = imports[placed_module][type_of_import] # type: ignore
KeyError: 'LOCALFOLDER'
The offending file is here https://github.com/SUNET/eduid-webapp/blob/master/src/eduid_webapp/eidas/app.py.
The fix was to add LOCALFOLDER to our section config in setup.cfg.
sections = FUTURE,STDLIB,THIRDPARTY,EDUID,FIRSTPARTY,LOCALFOLDER
Most helpful comment
The fix was to add LOCALFOLDER to our section config in setup.cfg.
sections = FUTURE,STDLIB,THIRDPARTY,EDUID,FIRSTPARTY,LOCALFOLDER