Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datatheorem/flake8-alfred
Alfred is a flake8 plugin to warn on unsafe/obsolete symbols.
https://github.com/datatheorem/flake8-alfred
flake8 flake8-plugin python3 security
Last synced: 2 months ago
JSON representation
Alfred is a flake8 plugin to warn on unsafe/obsolete symbols.
- Host: GitHub
- URL: https://github.com/datatheorem/flake8-alfred
- Owner: datatheorem
- License: mit
- Created: 2018-06-04T13:05:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-22T19:47:18.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T17:42:53.909Z (3 months ago)
- Topics: flake8, flake8-plugin, python3, security
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 36
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flake8-extensions - flake8-alfred - Alfred is a flake8 plugin to warn on unsafe/obsolete symbols. (Bugs)
README
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=$'obsolete_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
```