Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

Project description

flake8-filename

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


Release history Release notifications

This version
History Node

1.0.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
flake8_filename-1.0.0-py2.py3-none-any.whl (4.4 kB) Copy SHA256 hash SHA256 Wheel py2.py3 May 30, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page