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.2.tar.gz (6.2 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.2-py3.7.egg (25.6 kB view details)

Uploaded Egg

flake8_alfred-1.0.2-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flake8-alfred-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b3bd470635cd89591b04dc202c041a9d4ad7ea3ce5b6f85e48c4648b89614091
MD5 036983ba8fd9842244bad3b38ea49bcd
BLAKE2b-256 83bf7bc7d78fa710b49d248de128e5817a668cde8c48d05e4431a242de9c4d37

See more details on using hashes here.

File details

Details for the file flake8_alfred-1.0.2-py3.7.egg.

File metadata

  • Download URL: flake8_alfred-1.0.2-py3.7.egg
  • Upload date:
  • Size: 25.6 kB
  • Tags: Egg
  • 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.0.2-py3.7.egg
Algorithm Hash digest
SHA256 09a077bb89b8373ad6779871e7c19bc59d7a9bcdeb870a0ce471962f61e92899
MD5 06448c24c4d4d27381f1d552909d1f77
BLAKE2b-256 0303736cb14ed766d69eb169d1c056ead5ab2fd9678167e623ce8862b12b2eb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_alfred-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4bcad082ba6aec1c2664870b9182333e1365cbb5d60e9ca0f82d1d3ccb6bf1c8
MD5 1e5ba09414dd09dec8d2e130d113c604
BLAKE2b-256 2c8af51a8c26745c5b7406786a45c8ad8801c2eef412540d71c7c232856c5d39

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