Skip to main content

flake8-no-emoji

⭐️ Thanks everyone who has starred the project, it means a lot!

PyPI version Install from PyPI by clicking the badge above.

GitHub
View the source code on GitHub

Downloads License

Flake8 plugin that detects and reports any emoji characters in Python source code. Helps keep your codebase clean, consistent, and free from unwanted Unicode emojis.


Features

Note: Do not set the same category in both --ignore-emoji-types and --only-emoji-types, as only takes precedence over ignore.

  • Scans Python files for all Unicode emoji characters (including multi-codepoint clusters).

  • Raises a linting error (EMO001) when emojis are found.

  • Supports filtering by emoji categories:

    • --ignore-emoji-types=PEOPLE,FOOD
    • --only-emoji-types=FLAGS
  • Works seamlessly with Flake8 and pre-commit hooks.

  • Lightweight and dependency-minimal (regex and emoji required).


Installation

pip install flake8-no-emoji

Usage

Run normally via flake8:

flake8 app
flake8 --select=EMO

Example output:

/example.py:3:10: EMO001 Emoji detected in code

Configuration

You can configure categories to ignore or allow exclusively.

Ignore certain categories

flake8 --ignore-emoji-types=PEOPLE,FOOD

This ignores emojis in the PEOPLE and FOOD categories, but still reports others.

Allow only specific categories

flake8 --only-emoji-types=FLAGS

This only reports FLAGS emojis, ignoring everything else. (Note: only takes precedence over ignore.)


Example (with pre-commit)

Add to .pre-commit-config.yaml:

repos:
  - repo: https://github.com/AlgorithmAlchemy/flake8-no-emoji
    rev: v0.2.6
    hooks:
      - id: flake8
        additional_dependencies: [ flake8-no-emoji ]

Run:

pre-commit run --all-files

Categories Supported

  • PEOPLE 👩 👨 😀
  • NATURE 🌳 🐶 🌸
  • FOOD 🍕 🍔 🍎
  • ACTIVITY ⚽ 🎮 🎭
  • TRAVEL ✈️ 🚗 🚀
  • OBJECTS 💻 📱 📚
  • SYMBOLS ❤️ ☮️ ✔️
  • FLAGS 🇺🇸 🇯🇵 🏳️‍🌈
  • OTHER (fallback if no match)

Error Codes

  • EMO001 — Emoji detected in code.

Development

Clone and install in editable mode:

git clone https://github.com/AlgorithmAlchemy/flake8-no-emoji
cd flake8-no-emoji
pip install -e .[dev]
pytest

License

MIT License © 2025 AlgorithmAlchemy

Metadata

Release files for flake8-no-emoji 0.2.6

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

Source distribution (sdist)

Source distribution for flake8-no-emoji 0.2.6
File Size Uploaded Provenance
flake8_no_emoji-0.2.6.tar.gz 8.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-no-emoji 0.2.6
File Interpreter ABI Platform
flake8_no_emoji-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / flake8_no_emoji-0.2.6.tar.gz

Download URL flake8_no_emoji-0.2.6.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e4b76a2d2fa05f1042500c4d6cd28245ea533b28911a4f34697eb9fe547b8995
BLAKE2b-256 checksum
How to use checksums
8b86d207375d5d5db89ebff1d1c33ffd7b6564ef2bfaa05052a0fac1231ae3f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / flake8_no_emoji-0.2.6-py3-none-any.whl

Download URL flake8_no_emoji-0.2.6-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cca58a3962d1e69db8cfc54ad870604360b004553f62e3dcfa3a014c55642e7a
BLAKE2b-256 checksum
How to use checksums
203f4cb154962d8510f5f23be77adf7b84f30c2b2d8e7e72f6551e95ff8edce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for flake8-no-emoji 0.2.6

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.6 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