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:

[flake8]
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=$'obsolete_module=Warning!\nmodule.obsolete_function=Warning!'

Local Development

First, clone the repository:

git clone https://github.com/datatheorem/alfred-checker.git

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.

Source Distribution

flake8_alfred-1.1.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_alfred-1.1.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file flake8_alfred-1.1.2.tar.gz.

File metadata

  • Download URL: flake8_alfred-1.1.2.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for flake8_alfred-1.1.2.tar.gz
Algorithm Hash digest
SHA256 ccd77e103a9748c530ee0a56edb88d1e0efe7373b04c60c9c3fee0807e46e1b6
MD5 f344b75fd34e86c7ebe896aad6ce46bc
BLAKE2b-256 2a204c4a9b15b32273e2d1c17f574237bbf7455aa9bda7c4aa50ddc073149006

See more details on using hashes here.

File details

Details for the file flake8_alfred-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: flake8_alfred-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for flake8_alfred-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96073d7f07c8642c53a9845577cf2b5a5bc316d1921d33d4767c9def6540bd48
MD5 941de3fd9b9233d30ac93c7fc2d438ba
BLAKE2b-256 617ca264e86b064611142c3f6701c0546f3a625376d16568a32057688cb6ba84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page