executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
730 stars 192 forks source link

🔧 Add additional Ruff lints (and fix issues) #862

Closed danieleades closed 4 months ago

danieleades commented 6 months ago

lints are in separate commits for ease of reviewing (not every one of these lints will necessarily be of interest)

welcome[bot] commented 6 months ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.
Welcome to the EBP community! :tada:

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 72.22222% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 90.06%. Comparing base (c3fa3db) to head (8d99f4e).

Files Patch % Lines
myst_parser/parsers/docutils_.py 0.00% 4 Missing :warning:
myst_parser/mocking.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #862 +/- ## ======================================= Coverage 90.06% 90.06% ======================================= Files 24 24 Lines 3372 3373 +1 ======================================= + Hits 3037 3038 +1 Misses 335 335 ``` | [Flag](https://app.codecov.io/gh/executablebooks/MyST-Parser/pull/862/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | Coverage Δ | | |---|---|---| | [pytests](https://app.codecov.io/gh/executablebooks/MyST-Parser/pull/862/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks) | `90.06% <72.22%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=executablebooks#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

chrisjsewell commented 4 months ago

Actually, I also reverted https://docs.astral.sh/ruff/rules/missing-trailing-comma/; I don't think it integrates well with the ruff formatter, in particular https://docs.astral.sh/ruff/settings/#format_skip-magic-trailing-comma (see also https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#the-magic-trailing-comma)