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)

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

Usage
-----

By default, this plugin does nothing, you have to configure your project to
enable it. Also no symbols are source of warnings by default.

Here's an example of configuration in your project's `setup.cfg` (also works
with `.flake8`):

```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 avoid in our project, with the associated
warning. By default, this plugin doesn't warn about any 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!'
```

Cloning/Installation
--------------------

First, clone the repository:

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

Then, if you want to install the plugin on your user-specific directories, run
this command:

```bash
python3 setup.py install --user
```

If you want to install it on your system directories and make it available to
all the users, run this command:

```bash
python3 setup.py install
```

You can also use pipenv to setup a more reproductible environment, but the
setup.py install should be sufficient most of the time:

```bash
pipenv install
```

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.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distributions

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

flake8_alfred-1.0.0-py3.6.egg (13.7 kB view details)

Uploaded Egg

flake8_alfred-1.0.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flake8-alfred-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flake8-alfred-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f9dd5d67d44d8890455d9be56b837746afd6d3f228a19b4a59459396b0a1ed38
MD5 85017c9bfa757c95c597f2529479385d
BLAKE2b-256 01feb522039cc9fc7f6bac16d8ea165c17414cd971133a48d86e8d5047cfe09d

See more details on using hashes here.

File details

Details for the file flake8_alfred-1.0.0-py3.6.egg.

File metadata

File hashes

Hashes for flake8_alfred-1.0.0-py3.6.egg
Algorithm Hash digest
SHA256 1c9adcb2636de897530af42d5c29156791a2e97002106ec2ebd0376a22273d80
MD5 56f25ada82b9691e9b629b393e7ba3d4
BLAKE2b-256 f6746ac245365ea5e3c054b24370e3de8c97c29d4b4a2b988b5053b6d252a648

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_alfred-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eba2bb6c303d07acb6fd675c78c1b25be382be27d3f2cd1c0a8df447ea0d7dc7
MD5 f89b6a19d904233bd25dff26f4d09e26
BLAKE2b-256 e92ce321f5fe031050ea5101d84b668f787666143775f87f37c7527e2ff4a826

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