summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
Commit message (Collapse)AuthorAgeFilesLines
* ensure single import per lineMike Bayer2023-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the very small plugin flake8-import-single which will prevent us from having an import with more than one symbol on a line. Flake8 by itself prevents this pattern with E401: import collections, os, sys However does not do anything with this: from sqlalchemy import Column, text Both statements have the same issues generating merge artifacts as well as presenting a manual decision to be made. While zimports generally cleans up such imports at the top level, we don't enforce zimports / pre-commit use. the plugin finds the same issue for imports that are inside of test methods. We shouldn't usually have imports in test methods so most of them here are moved to be top level. The version is pinned at 0.1.5; the project seems to have no activity since 2019, however there are three 0.1.6dev releases on pypi which stopped in September 2019, they seem to be experiments with packaging. The source for 0.1.5 is extremely simple and only reveals one method to flake8 (the run() method). Change-Id: Icea894e43bad9c0b5d4feb5f49c6c666d6ea6aa1
* bump black to 22.3.0Mike Bayer2022-03-281-1/+1
| | | | | | | | | both black and click were released in the past few hours, and black 21.5b1 seems to suddenly be failing on a missing symbol from click. just update to the latest Change-Id: Icb9d98d6473aa603aa29ad1c2d1e43ff3b371db5
* Update black, zimports and flake8CaselIT2021-05-121-3/+5
| | | | Change-Id: Ia7d0ea7cc4389bc6adc4226efd5b18ecb68ffb2b
* add versions for pre-commit toolsMike Bayer2021-02-201-2/+2
| | | | | | | latest pre-commit is warning for use of "master" so apply version numbers Change-Id: I1375ef87a6d0b67e0fb0caeb03743d0dcd1af5ea
* Update black to 20.8b1CaselIT2020-10-261-1/+1
| | | | Change-Id: Id9b8ce6a0ccd2a6fa17b779c95d4079a5fa629d7
* Update black to match sqlalchemy versionCaselIT2020-03-181-2/+1
| | | | | | | Also add a in the pep8 tox job a check to verify that all files are properly formatted Change-Id: I7bac8463b273f3bce9be098e6ee76f1761e28e72
* Remove trailing slashes in pre-commit configMike Bayer2020-03-111-2/+2
| | | | | | See https://github.com/sqlalchemy/dogpile.cache/pull/176 Change-Id: Id9a75546d4d0eae93ad837a77c6ffa9249efff5c
* Source cleanupsMike Bayer2020-01-011-0/+14
| | | | | | | | - install flake8 to pre-commit hooks - remove unused run_tests.py file - ensure full pre-commit run succeeds Change-Id: I31290078e48821ce9d78d45a74b51d0004047a1e
* Add .pre-commit-config.yamlMike Bayer2019-05-181-0/+15
See https://pre-commit.com/ for documentation on how to use this file. SQLAlchemy and related projects make use of Black and zimports for code formatting, this hook allows for automated pre-commit runs. Change-Id: I4bbb49747e9f7fb52251dc61ecda98361cd036fd