executablebooks / markdown-it-py

Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed. Now in Python!
https://markdown-it-py.readthedocs.io
MIT License
662 stars 68 forks source link

Isort is already included in ruff, use that. #310

Closed venthur closed 7 months ago

chrisjsewell commented 7 months ago

Heya, this won't actually sort them when running pre-commit though, it'll just fail if they are not sorted. You need to set up the ruff formatter and stuff for that

venthur commented 7 months ago

Good call. I only use --fix here to fix the linter issues that can be automatically fixed. In case of isort all of them should be fixable, some others might not be, though, and we're running black anyways which should take care of the rest. In principal, you could think about replacing black with ruff as well and go full ruff format .

chrisjsewell commented 7 months ago

For formatting, you shouldn't have to run anything apart from pre-commit, and it should just do it all

For linting obviously that's not always possible.

Sorting imports is certainly formatting and not linting though

venthur commented 7 months ago

Ah ok, i wasn't aware. Feel free to close that PR then. Cheers!

chrisjsewell commented 7 months ago

Superceded by #313 😄