# Enforce ASCII
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
**VERSION**: `0.2.0`
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-python`, you can install it with _pip_, _pipx_, etc.
```shell
pip install enforce-ascii
```
## Usage
```shell
$ 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
```shell
$ 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:
```yaml
- repo: https://github.com/brutus/enforce-ascii
rev: v0.2.0
hooks:
- id: enforce-ascii
```
[issue tracker]: https://github.com/brutus/enforce-ascii/issues
[pre-commit]: https://pre-commit.com/
[pypi]: https://pypi.org/project/enforce-ascii/
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共8个文件
py:5个
toml:1个
pkg-info:1个
资源分类:Python库 所属语言:Python 资源全名:enforce-ascii-0.2.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
enforce-ascii-0.2.0.tar.gz (8个子文件)
enforce-ascii-0.2.0
PKG-INFO 2KB
pyproject.toml 2KB
src
enforce_ascii
utils.py 2KB
cli.py 1018B
__main__.py 189B
__init__.py 419B
setup.py 2KB
README.md 1KB
共 8 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于STM32使用HAL库实现USB组合设备之多路CDC源码+说明文档.zip
- 金融贸易项目springboot
- mybatis动态sqlSQL 映射 XML 文件是所有 sql 语句
- 基于基于STM32的智能家居系统源码+qt上位机源码.zip
- 深圳房地产资源数据报告
- 基于stm32的智能门禁系统源码+设计文档+演示视频.zip
- cef + chromium 完整源码支持h265和h264
- 基于SpringBoot的API管理平台源代码+数据库,以项目的形式管理API文档,可以进行API的编辑、测试、Mock等操作
- protobuf 3.11版本,静态编译
- 2023NOC创客智慧编程赛项真题图形化-选拔赛(有解析)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功