Skip to main content

Flake8 plugin warning for unsafe functions

Project description

Alfred the butler

[![Build Status](](
[![PyPI version](](

Alfred is a flake8 plugin to warn on unsafe/obsolete symbols. You can use it as
a transition tool to eliminate functions, modules, variables you don't want in
existing project or you want to avoid in new ones. This plugin requires Python 3.6.

Getting Started

First, install Alfred using pip:

$ pip install flake8-alfred

Then, enable the plugin by configuring a blacklist of Python symbols that should
be flagged by flake8. Here is an example of configuration in your project's `setup.cfg`:

enable-extensions = B1
warn-symbols =
obsolete_module = Warning! This module is obsolete!
module.obsolete_function = Warning! This function is obsolete!
module.submodule.constant = Warning! this variable will be removed!

Here `enable-extensions` tells flake8 to enable this plugin and `warn-symbols` is
the list of symbols we want to flag in our project, with the associated
warning. By default, this plugin doesn't warn about any other symbol.

If you just want to test/run once, you can also pass the configuration directly
to flake8:

$ flake8 --enable-extensions=B1 --warn-symbols=$'obsolte_module=Warning!\nmodule.obsolete_function=Warning!'

Local Development

First, clone the repository:

git clone

The project uses pipenv to manage dependencies:

$ pipenv install --dev

Then, the test suite can be run:

$ pipenv run pytest

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-alfred, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size flake8_alfred-1.1.1-py3-none-any.whl (11.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-alfred-1.1.1.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page