Skip to main content

A flake8 linter plug-in for validating that certain Python files comply with a user defined pattern.

Project description

flake8-filename

https://img.shields.io/travis/rcbops/flake8-filename.svg

A flake8 linter plug-in for validating that certain Python files comply with a user defined pattern.

Quick Start Guide

  1. Install flake8-filename from PyPI with pip:

    $ pip install flake8-filename
  2. Configure a mark that you would like to validate:

    $ cd project_root/
    $ vi .flake8
[flake8]
filename_check1 = filter_regex=test_.+
                  filename_regex=test_[\w-]+$
  1. Run flake8:

    $ flake8 tests/

Gotchas

  1. It is highly recommended to use this plugin inside of a virtualenv

  2. A configuration is required by this plugin, if none is found the plugin will throw a N401 validation error for every file

Violation Codes

All possible violation codes are documented in violation_codes

Example Configurations

More example configurations can be found in configuration

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

flake8_filename-1.0.0-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flake8_filename-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_filename-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bb22793f4883db9c2c2301b4d0cf1f692a58d93c579988931c9770d31e19d5b7
MD5 075162d762815ac7ff8860da7cdcc812
BLAKE2b-256 a4425d6a0b663686d1cc2dac74e69ff751f78b7e2793ec04da52ea6058f48e34

See more details on using hashes here.

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