Skip to main content

Flake8 plugin warning for unsafe functions

Project description

Alfred the butler
=================

[![Build Status](https://travis-ci.org/datatheorem/flake8-alfred.svg?branch=master)](https://travis-ci.org/datatheorem/flake8-alfred)
[![PyPI version](https://badge.fury.io/py/flake8-alfred.svg)](https://badge.fury.io/py/flake8-alfred)

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:

```bash
$ 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`:

```ini
[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:

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

Local Development
-----------------

First, clone the repository:

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

The project uses pipenv to manage dependencies:

```bash
$ pipenv install --dev
```

Then, the test suite can be run:

```bash
$ 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.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

flake8_alfred-1.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file flake8-alfred-1.1.1.tar.gz.

File metadata

  • Download URL: flake8-alfred-1.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for flake8-alfred-1.1.1.tar.gz
Algorithm Hash digest
SHA256 c68b40165b00d3c9f0da6e64f08e95da919fc358dc8b8596374f54fa63cd6be5
MD5 337affcce17ac5b583356badca62dd57
BLAKE2b-256 553927d79b6236119c9611953153031feab5b6b755dd6ab004f9447b99e63cb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: flake8_alfred-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for flake8_alfred-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3cce4a91fe07b50b5efcb650f5f13901052b64c3850f9cf10cce330efab6b34d
MD5 93060cf71a3be483f1f63b6de33ad0a4
BLAKE2b-256 fe9d434790d9034b961a9c79830f9b8e70b2492fbd0e914a05215fa6390b95eb

See more details on using hashes here.

Supported by

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