My own useful pre-commit hooks
Project description
mondeja's pre-commit hooks
Example configuration
- repo: https://github.com/mondeja/pre-commit-hooks
rev: v1.2.1
hooks:
- id: dev-extras-required
Hooks
add-pre-commit-hook
Add a pre-commit hook to your configuration file if is not already defined.
Parameters
-repo=URL
(str) Repository of the new hook.-rev=VERSION
(str) Version of the new hook.-hook=ID
(str) Identifier of the new hook.
dev-extras-required
- Doesn't support
setup.py
files. Please, migrate your setup configuration tosetup.cfg
format.- Support for
pyproject.toml
files is limited to printing errors, automatic file rewriting is not performed.
Check if your development dependencies contains all other extras requirements. If an extra requirement is defined in other extra group than your development one, it will be added to your development extra dependencies group. If your development group is not defined, it will be created.
This is useful if you want to execute python -m pip install -e .[dev]
to
install all the optional requirements of the package, so if you add a new
requirement to another groups, it will be added to development requirements.
Parameters
-extra=NAME
(str): Name for your development requirements extra group (as defaultdev
).-setup-cfg=PATH
(str): Path to yoursetup.cfg
file, mandatory if the extras requirements are defined in asetup.cfg
file and this is located in another directory than the current one.-pyproject-toml=PATH
(str): Path to yourpyproject.toml
file, mandatory if the extras requirements are defined in apyproject.toml
file and this is located in another directory than the current one.
root-editorconfig-required
Check if your repository has an .editorconfig
file and if this has a root
directive defined as true
before section headers.
wavelint
Check if your WAVE files have the correct number of channels, frame rate, durations...
Parameters
-nchannels=N
(int): Number of channels that your sounds must have.-sample-width=N
(int): Number of bytes that your sounds must have.-frame-rate=N
(int): Sampling frequency that your sounds must have.-nframes=N
(int): Exact number of frames that your sounds must have.-comptype=TYPE
(str): Compression type that your sounds must have.-compname=NAME
(int): Compression that your sounds must have.-min-duration=TIME
(float): Minimum duration in seconds that your sounds must have.-max-duration=TIME
(float): Maximum duration in seconds that your sounds must have.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mondeja_pre_commit_hooks-1.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d782273a8980fa29153712e378e5ffcfa5e78dc76bcda4ad9e5c0dbba2c32956 |
|
MD5 | 76b372fb270e3d4c3ddf9a68e7864799 |
|
BLAKE2b-256 | 55e29fdce5bc0ea1182e3f1b0ea0fb61931b0bb5c1aaec3e88f8dc7bdb18b3cf |
Hashes for mondeja_pre_commit_hooks-1.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c1c683f7b98722373da62143b614baca75c4f244621803ed7ab6a9ec4ac589c |
|
MD5 | 4d2ea31b00d9ca26bdbc42e7ebc99afc |
|
BLAKE2b-256 | 6036b2db07bafd55b4c4ce0f80849818c1b6277890dc32d7631ffd928fc506a1 |