Skip to main content

A flake8 extension that checks for tuple unpack length

Project description

flake8-tuple-unpack-limit

PyPI - Python Version

An extension for flake8 to report on too long tuple unpacking.

Default max unpack length is 4 and can be configured via --max-unpack-length option.

Installation

pip install flake8-tuple-unpack-length

Example

Sample file:

# test.py
def foo():
    return (1, 2, 3, 4, 5)


a, b, c, d, e = foo()

Usage:

$ flake8 --max-unpack-length 3 test.py
test.py:6:1: TUL001 unpack too many variables (5 > 3)

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-tuple-unpack-limit-0.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

flake8_tuple_unpack_limit-0.0.1-py3.8.egg (3.7 kB view hashes)

Uploaded Source

Supported by

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