Closed CartoonFan closed 4 years ago
Hi @CartoonFan
Sorry for the confusion caused by the error message.
@timothycrosley made a change in develop
that will make these error messages more user-friendly, but it hasn't been released yet (https://github.com/PyCQA/isort/pull/1476).
Running the develop
version of isort on lutris gives these error messages:
isort.exceptions.UnsupportedSettings: isort was provided settings that it doesn't support:
- ignore-comments = yes (source: '/home/sztamas/Work/lutris/.isort.cfg')
- min-similarity-lines = 5 (source: '/home/sztamas/Work/lutris/.isort.cfg')
- ignore-docstrings = yes (source: '/home/sztamas/Work/lutris/.isort.cfg')
- ignore-imports = yes (source: '/home/sztamas/Work/lutris/.isort.cfg')
You can see a list of the configuration options isort doesn't recognize and also where these values are set. Hopefully, this improvement will make it easier to find these type of config errors in the future (when this improvement will be released).
In the meantime, you can use the error message above to fix those configuration options for lutris
.
I hope this helps!
Tamas
Thanks @sztamas! I was able to disable the unsupported settings and isort worked correctly. I'm kind of curious about these settings, though. Are they from an old version of isort or something?
I was curious as well, so I tried to look them up in the isort 4 -> 5 migration guide but couldn't find them.
Me being unaware of them doesn't mean much though as I'm relatively new on the project.
Maybe @timothycrosley can share some historical info? If not then we'll probably never find out how they ended up in your codebase :)
I see. When I made the pull request to remove the options from the lutris .isort.cfg file, the reviewer simply said that the options were "no longer supported on isort 5.x". I'm still curious about it, but I guess it's not a huge deal if nothing turns up. Thanks for responding to my comment, though, and I'll be listening if some new information comes up :smile: .
Hi! I'm sorry you encountered these errors! The truth is isort never supported these options, however before isort 5 isort would quietly ignore them instead of alerting the user to the unsupported option. That combined with the very large number of options isort does support, and the fact they used to not be well documented in a central location, led to a lot of config files with options that never existed. I think we should probably add an additional note to the upgrade guide about this.
I hope this is helpful!
Thanks!
~Timothy
Thanks for your response! I think this kind of "lore" is somewhat interesting, but I'm surprised that the options were never supported. I guess someone just decided to add it to the config file and isort just shrugged :shrug: and went along with it. Again, thanks for responding; I'm sure you're pretty busy, so I appreciate you taking the time out to answer something like this.
Jeremiah
Hello! I recently ran into an issue where isort crashes while scanning setup.py from the lutris project. I didn't really understand what happened, so I figured that I would ask here. Restyler.io also runs into a similar error, so I don't think it's entirely due to my PC. Thank you and I appreciate your hard work!
My error:
Restyler.io: