Commit graph

15 commits

Author SHA1 Message Date
David Douard
c6baacbcd7 Apply swh-py-template v0.2.3 2024-08-27 16:25:53 +02:00
Antoine Lambert
aafaebd5de crates: Use looseversion.LooseVersion2 to parse crate versions
packaging.version.parse is dedicated to parse Python package version
numbers but crate versions do not necessarily respect Python version
number conventions and thus some crate versions cannot be parsed.

Prefer to use looseversion.LooseVersion2 instead which in a drop-in
replacement for deprecated distutils.version.LooseVersion and enables
to parse all kind of version numbers.
2024-08-27 12:28:05 +02:00
David Douard
e6a35c55b0 Apply swh-py-template v0.2.0 2024-03-29 13:55:23 +01:00
David Douard
ac52cfed21 Apply swh-py-template 0.1.6 2023-12-03 17:54:52 +01:00
David Douard
c2402f405f Migrate to copier-based swh-py-template 2023-11-29 17:23:28 +01:00
Antoine Lambert
36179044ad pre-commit: Bump isort from 5.10.1 to 5.11.5
This fixes python 3.7 support due to poetry, a dependency of isort, that
removed support for that Python version in a recent release.
2023-02-02 11:07:28 +01:00
David Douard
8778b9cdbf pre-commit, tox: Bump pre-commit, codespell, black and flake8
- pre-commit from 4.1.0 to 4.3.0,
- codespell from 2.2.1 to 2.2.2,
- black from 22.3.0 to 22.10.0 and
- flake8 from 4.0.1 to 5.0.4. Also freeze flake8 dependencies.

Also change flake8's repo config to github (the gitlab mirror
being outdated).
2022-10-18 18:53:29 +02:00
Antoine Lambert
20c1351aa0 pre-commit: Remove codespell commit-msg hook
That hook can be frustrating as it can discard a long commit message
if it finds a typo in it so better removing it.
2022-04-21 13:39:42 +02:00
Antoine Lambert
00f1b99ad9 pre-commit, tox: Bump black from 19.10b0 to 22.3.0
black is considered stable since release 22.1.0 and the version
we are currently using is quite outdated and not compatible with
click 8.1.0, so it is time to bump it to its latest stable release.

Please note that E501 pycodestyle warning related to line length
is replaced by B950 one from flake8-bugbear as recommended by black.
https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length

Related to T3922
2022-04-08 15:13:41 +02:00
Franck Bret
fea6fc04aa lister: Add new rust crates lister
The Crates lister retrieves crates package for Rust lang.

It basically fetches https://github.com/rust-lang/crates.io-index.git
to a temp directory and then walks through each file to get the
crate's info.
2022-03-28 08:42:31 +02:00
Antoine Lambert
c17a932ccf pre-commit: Bump hooks and add new one to check commit message spelling
To install the new hook:

  $ pre-commit install -t commit-msg
2022-02-10 16:24:19 +01:00
Antoine Lambert
d24846a957 pre-commit: Add isort hook and configuration
Related to T2610
2020-09-17 17:48:25 +02:00
Antoine Lambert
cef98c9b9b pre-commit: Update flake8 hook configuration
flake8 hook has been removed from https://github.com/pre-commit/pre-commit-hooks
so now use the one from https://gitlab.com/pycqa/flake8
2020-09-17 13:55:01 +02:00
David Douard
93a4d8b784 Enable black
- blackify all the python files,
- enable black in pre-commit,
- add a black tox environment.
2020-04-08 16:31:22 +02:00
David Douard
dfd8569c58 Add a pre-commit config file 2019-11-21 14:10:42 +01:00