Ensure that python code files does not contains UTF-8 or other fancy char encoding.
This module provides a plugin for flake8
, the Python code checker.
Install with pip:
pip install flake8-ensure-ascii
The plugin officially supports Python >= 3.6
and flake8 >= 3.7
.
You may find other Python 3 versions work as well.
The plugin finds non ASCII chars you may not want to commit:
def my_function():
print("It works 😋")
./my_file.py:2:21: ENC100 Non ASCII encoding found
Initial commit !