Packaging improvements#8
Conversation
See https://endoflife.date/python for exact dates
|
This is great. It will be difficult review with all of the linter changes included. Can you separate those out? |
|
I don't know if git will (easily) let me "undo" those commits but I went again in reverse in #9 and avoided running the ruff re-formatting (I usually use an editor that auto-formats on saves!) I've initially stopped short of running the flake8 lints (i.e. I re-did back to commit 4 of this PR at 90db95b) because I wasn't sure if you meant lint as in just code formatters or also the flake8 ones (some of which are correctness), but I'll leave it there in case I misinterpret! Assuming that PR is OK, remaining work is just the re-formatting and removing linter errors, please let me know how you'd want those (if you have any particular preferences) 🙂 |
Status - ready for review 🏁
This PR carries out some housekeeping and I have verified them all as I go.
First I ran some linting (ruff code formatter and flake8 static analyser) that put the code in a standard format and fixed some mistakes (e.g. unnamed variables) and clarified ambiguous code (e.g. made
*imports explicit).plots- the matplotlib and seaborn depsdev- ruff and flake8biberplus[plots]extra)requirements.txtwhich is redundant with the pyproject.toml package dependencies and pinned a spaCy model version of 3.5 which would fall behind (latest is currently 3.8)uv sync --all-extras)UHtag, another test already covers this)Checklist
Click to show details on the regex syntax warnings
Regex syntax warnings
There are 2 warnings:
Regex warning 1: emoticon escape
The pattern matches:
[:;=]- eyes (colon, semicolon, or equals)(?:-)?- optional nose (dash)[)DPp/]- mouth (smile, big grin, tongue, or slant)The error is from escaping the slanted mouth of
:-/We don't need the backslash
Regex warning 2: URL escape
Similarly
This one requires a raw string for the legitimate escapes
\sand\.but we should just remove the backslash escaping the/(which Python doesn't need, that's Javascript-like regex)Specifically this removes the escaping of
\/\/->//in thehttps://parts of the regex...and with that biberplus imports without a SyntaxWarning 🎉