A pre-commit hook, that enforces ASCII content.
Project description
Enforce ASCII
A Python package to find files containing non-ASCII encoded characters. If you find any bugs, issues or anything, please use the issue tracker on GitHub - issues and PRs are welcome ❤️
Install
It's on [PyPi] as ski-lint
, you can install it with pip, pipx, etc.
pip install ski-lint
Usage
$ ski-lint --help
usage: ski-lint [-h] [--version] [--check] FILENAME [FILENAME ...]
A pre-commit hook, that rejects files containing non ASCII characters.
positional arguments:
FILENAME path to the files to check
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--check return code is `1`, when non-ASCII files are found
Example
$ ski-lint tests/files/*/*.txt
- tests/files/bad/special.txt (Windows-1252): 'there…'
- tests/files/bad/umlaut.txt (utf-8): 'föur', 'käle', 'Åir'
Pre-Commit
This can be used as a pre-commit hook:
- repo: https://github.com/svdimchenko/ski-lint
rev: v0.1.0
hooks:
- id: ski-lint
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ski_lint-0.2.0.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file ski_lint-0.2.0.tar.gz
.
File metadata
- Download URL: ski_lint-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 905dbe281ee0faff4bf4e5550b1b7a15af025cc4e3539a374a863edce6fa4b01 |
|
MD5 | 26c875e9579165e89952119f98b9da0c |
|
BLAKE2b-256 | 0734cdbbba5127264d8d5e80072d681670f93c3b4700b6226d6d6d31513523a9 |
File details
Details for the file ski_lint-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: ski_lint-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 219960c2ef23c33154e69931efa3f677a55e2cc56f1cc7afb5fb6aa3de746455 |
|
MD5 | 1a9ce4f90959994fd2c0d0aee9680c3b |
|
BLAKE2b-256 | 2f1d7664c4a0bf96ce7cd5d5b01b5315bfefcf7c55e7b7154bff0f341ae79816 |