Skip to main content

Enforce ASCII

pre-commit

VERSION: 0.2.1

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 enforce-ascii, you can install it with pip, pipx, etc.

pip install enforce-ascii

Usage

$ enforce-ascii --help
usage: enforce-ascii [-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

$ enforce-ascii 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/brutus/enforce-ascii
  rev: v0.2.1
  hooks:
      - id: enforce-ascii

Metadata

Release files for enforce-ascii 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enforce-ascii 0.2.1
File Size Uploaded Provenance Actions
enforce-ascii-0.2.1.tar.gz 3.9 kB Without provenance Details for enforce-ascii-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for enforce-ascii 0.2.1
File Interpreter ABI Platform Actions
enforce_ascii-0.2.1-py3-none-any.whl Python 3 none any Details for enforce_ascii-0.2.1-py3-none-any.whl

Total release size: 8.0 kB

Release files / enforce-ascii-0.2.1.tar.gz

Download URL enforce-ascii-0.2.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b5d09baf289c81cdb5b328e8d622fe98e306c4340381d1d0f1b7778d2969ba50
BLAKE2b-256 checksum
How to use checksums
3ec3152f05568d5b6e43d964242e71e700f574bb1be0e12f48952dd2a48b1520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.7 Linux/5.7.7-100.fc31.x86_64

Release files / enforce_ascii-0.2.1-py3-none-any.whl

Download URL enforce_ascii-0.2.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
043eb628d4b49169d32e12d08ce8428b729105ce46379ba6b7bb97786407054a
BLAKE2b-256 checksum
How to use checksums
773a492d6ee63f6065fbcf511917be33086cc1a5ff18d313cd09cae0cec1c179
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.7.7 Linux/5.7.7-100.fc31.x86_64

Security for enforce-ascii 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page