-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardise all pre-commit hooks, including more ruff, code formatting etc #132
Comments
This is my WIP template for ruff that I need to adapt for newer versions of ruff: https://github.com/LM-SAL/irispy-lmsal/blob/docs/ruff.toml |
Here's my dkist one: https://github.com/DKISTDC/dkist/blob/main/.ruff.toml |
I think in general I prefer the opt-in rather than opt out approach, for two main reasons: there's a lot of irrelevant rulesets (like django etc) and also because I would rather new rule sets were opt-in rather than opt-out. |
Ruff exclude rules listAll of these are used in the extends ignore of both styles PyFlake8
Errors
PyTestPT001 - pytest-fixture-incorrect-parentheses-style - dkist. sunpy PyUpgradeUP038 - non-pep604-instance - dkist ReturnsRET502 - implicit-return-value - dkist PathlibPTH123 - builtin-open - dkist RuffRUF012 - multable-class-deffault - dkist AnnotationsANN001 - Missing type annotation for function argument - irispy PydocstyleD200 - fits-on-one-line - irispy ISC001 - single-line-implicit-string-concatenation - irispy |
Top Level IncludesPyflakes - Fused in - dkist, ndcube, template, drms use in template? - yes pycodestyle - Eused in - dkist, ndcube, template, drms use in template? - yes warning - Wused in - ndcube, drms use in template - yes mccabe - C90description - structure too complex use in template - no isort - Idescription - sort python imports use in template - no pep8-naming - Ndescription - PEP8 naming conventions baby! use in template - yes pydocstyle -Ddescription - pydocstyle is a static analysis tool for checking compliance with Python docstring conventions. use in template? - no pyupgrade - UPdescription - A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language use in template? - yes flake8-2020 - YTTdescription - 2020 handling for py3.10 use in template? - no flake8-annotations - ANNdescription - detects the abscence of PEP3107 use in template? - no flake8-async - ASYNCdescription - deals with async beef use in template? - maybe flake8-bandit - Sdescription - looks for security issues in your code use in template? - no flake8-blind-except - BLEdescription - hunts for pokemon exceptions use in template? - yes flake8-boolean-trap - FBTdescription - hunts for boolean anti patterns use in template? - maybe flake8-bugbear - Bdescription - bug hunter, has warning not in pyflakes or pycodestye use in template? - yes flake8-builtins - Adescription - ensures builtins aren't being redefined use in template? - yes flake8-commas - COMdescription - comma handling, might be nice to have so we're not adding out trailed commas etc use in template? - yes flake8-copyright - CPYuse in template? - no flake8-comprehensions - C4description - cleans up unnecessary code blocks use in template? - maybe flake8-datetimes - DTZdescription - datetime cleaning up use in template? - maybe flake8-debugger - T10use in template? - no flake8-django - DJuse in template? - no flake8-errmsg - EMdescription - exception/error message hanfling use in template? - no flake8-executable - EXEdescription - shebang handling use in template? - no flake8-future-annotations - FAuse in template? - no flake8-implicit-str-concat - ISCuse in template? - no flake8-import-conventions - ICNdescription - An opinionated plugin for Flake8 on how certain packages should be imported or aliased use in template? - no flake8-logging - LOGdescription - standard logging issues use in template? - maybe flake8-logging-format - Gdescription - removes formatting in logging use in template? - maybe flake8-no-pep420 - INPuse in template? - no flake8-pie - PIEuse in template? - no flake8-print - T20description - print eradicator use in template? - maybe flake8-pyi - PYIdescription - specializations for type hinting stub files use in template? - no flake8-pytest-style - PTdescription - flake8 specific style and inconsistency checker in pytest use in template? - yes flake8-quotes - Qdescription - handles escaped strings use in template? - no flake8-raise - RSEdescription - unecessarry parentheses on raise use in template? - no flake8-return - RETdescription - ensures function returns are sensible use in template? - yes flake8-self - SLFuse in template? - no flake8-slots - SLOTuse in template? - no flake8-simplify - SIMdescription - code simplifier, ie unused stuff and neutral vs keyword comparision use in template? - no flake8-tidy-imports - TIDdescription - import checking for flake8 use in template? - no flake8-type-checking - TCHdescription - flake8 argument checking use in template? - maybe flake8-gettext - INTuse in template? - no flake8-unused-arguments - ARGdescription - argument hanfling use in template? - no flake8-use-pathlib - PTHdescription - handles pathlib behaviours for safety use in template? - yes flake8-todos - TDdescription - fixme and todo removal with flake8 use in template? - no flake8-fixme - FIXdescription - fixme and todo removal with flake8 use in template? - no eradicate - ERAdescription - commented out code banhammer use in template? - maybe pandas-vet - PDdescription - pandas specific linting use in template? - maybe pypgrep-hooks - PGHdescription - linting for pre-commit hooks use in template? - no pylint - PLHas sub categorites thus Convention - PLCdescrption - convention enforcement, pylint specific use in template? - yes Error - PLEdescription - pylint specific error detection use in template? - yes Refactor - PLRdescription- specific refactoring linting use in template? - no Warning - PLWdescription - pylint specific warnings for code design use in template? - maybe tryceratops - TRYdescription - prevents exception handling antipatterns use in template? - no flynt - FLYuse in template? - no, we should stop old formatting at PR NumPy-specific-rules - NPYdescription - numpy depreciation messaging use in template? - no FastAPI - FASTuse in template? - no Airflow - AIRuse in template? - no Perflint - PERFdescription - linting looking specifically for anti patterns use in template? - no refurb - FURBdescription - refurbishment package use in template? - no pydoclint - DOCdescription - really pinikity documentation rules use in template? - no ruff specific rules - RUFused in - drms use in template? -yes |
Currently there is still quite some variation in the ruff config's and pre-commit configs. We should standardise on a single set.
The text was updated successfully, but these errors were encountered: