Skip to main content

flake8 plugin which checks that modules under `__all__` are defined as strings

Project description

flake8-all-not-strings

PyPI data-understand MIT license versions Downloads

Python Linting Run Python Unit Tests

CodeFactor

Flake8 plugin that checks that the all the elements defined in the __all__ list are strings. Sometimes the flake8 doesn't throw error from the __init__.py if the modules under __all__ are not strings.

Example below of an __init__.py file which should throw an error:-

from some_module import some_function 
__all__ = [
      some_function
]

Example below of an __init__.py file which should not throw an error:-

from some_module import some_function 
__all__ = [
      'some_function'
]

Installation

pip install flake8-all-not-strings

Flake8 codes

Code description
ANS100 '<<some_module_name>>' import under all is not a string.

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_all_not_strings-0.0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

flake8_all_not_strings-0.0.1-py2.py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 2 Python 3

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