Skip to main content

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.

Testing

In order to run unit tests under the tests/ directory you can do the following steps:-

Install editable version of flake8-all-not-strings from the top level directory

pip install -e .

Install pytest

pip install pytest

Run tests

Change to tests/ directory and run tests using pytest

cd tests/
pytest

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.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_all_not_strings-0.0.3-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file flake8_all_not_strings-0.0.3.tar.gz.

File metadata

  • Download URL: flake8_all_not_strings-0.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for flake8_all_not_strings-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9d0f5472dc135feec64339db1d23b051be4d3bbe7873f43838b862c7beb4d604
MD5 259acd574fe18cca9499ba927742b133
BLAKE2b-256 33d848dce4a889315bcc9c0d8ec29f86d9b31802e4da8746a4f164fc7229a995

See more details on using hashes here.

File details

Details for the file flake8_all_not_strings-0.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_all_not_strings-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 debb85d45c779ea261915fc903ea6bc1763d3798c3199f2492d963548b32d2f5
MD5 7bc9ef783196a8102613c0bb10af9a46
BLAKE2b-256 28dee61706796651207e00cfc5e24dc4246a3e0d32e6571be4a9265f2e6688fd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page