Skip to main content

click-linter

Flake8 plugin for detecting click best practices

Checks

  • CLC001: checks for missing help text for click.option-s
  • CLC100: missing argument for click.option
  • CLC101: click option name does not begin with '-'
  • CLC102: click argument name begins with '-'
  • CLC103: click parameter is missing name
  • CLC200: click.launch may be called with user input, leading to a security vulnerability

Installing

$ python -m pip install flake8-click

Specify python2 or python3 to install for a specific Python version.

And double check that it was installed correctly:

$ python -m flake8 -h
Usage: flake8 [options] file file ...

...

Installed plugins: flake8-click : 0.1.0, mccabe: 0.5.3, pycodestyle: 2.2.0, pyflakes: 1.3.0

Note the flake8-click: 0.1.0.

Using

Click best practices is a flake8 plugin. You can easily use this plugin by

$ python -m flake8 --select=CLC /path/to/code

Testing

$ pytest

Metadata

Release files for flake8-click 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for flake8-click 0.2.0
File Interpreter ABI Platform
flake8_click-0.2.0-py3-none-any.whl Python 3 none any Details

Release files / flake8_click-0.2.0-py3-none-any.whl

Download URL flake8_click-0.2.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17d783efe41fbde37c089ce4bb3a9cbfd595e5c8789ec071525f3c4fe32d6238
BLAKE2b-256 checksum
How to use checksums
9af4e778d5a1626013ec366ce3ed1fdeda38b4ae0c8f48247f210ccb0622ccdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.2

Release history Release notifications | RSS feed

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page