GithubHelp home page GithubHelp logo

yutkin / pep8-naming Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pycqa/pep8-naming

1.0 2.0 0.0 133 KB

Naming Convention checker for Python

Home Page: pypi.python.org/pypi/pep8-naming

License: Other

Python 100.00%

pep8-naming's Introduction

https://travis-ci.org/PyCQA/pep8-naming.svg?branch=master

PEP-8 Naming Conventions

Check the PEP-8 naming conventions.

This module provides a plugin for flake8, the Python code checker.

(It replaces the plugin flint-naming for the flint checker.)

Installation

You can install, upgrade, uninstall pep8-naming with these commands:

$ pip install pep8-naming
$ pip install --upgrade pep8-naming
$ pip uninstall pep8-naming

Plugin for Flake8

When both flake8 and pep8-naming are installed, the plugin is available in flake8:

$ flake8 --version
2.0 (pep8: 1.4.3, pyflakes: 0.6.1, naming: 0.2)

By default the plugin is enabled.

These error codes are emitted:

code sample message
N801 class names should use CapWords convention
N802 function name should be lowercase
N803 argument name should be lowercase
N804 first argument of a classmethod should be named 'cls'
N805 first argument of a method should be named 'self'
N806 variable in function should be lowercase
N807 function name should not start or end with '__'
   
N811 constant imported as non constant
N812 lowercase imported as non lowercase
N813 camelcase imported as lowercase
N814 camelcase imported as constant
N815 mixedCase variable in class scope
N816 mixedCase variable in global scope

Options

The following flake8 options are added:

--ignore-names

Ignore errors for specific variable names.

Currently, this option can only be used for N802, N806, N815, and N816 errors.

Default: setUp,tearDown,setUpClass,tearDownClass,setUpTestData,failureException,longMessage,maxDiff.

--classmethod-decorators
 

List of method decorators pep8-naming plugin should consider class method.

Used to prevent false N804 errors.

Default: classmethod.

--staticmethod-decorators
 

List of method decorators pep8-naming plugin should consider static method.

Used to prevent false N805 errors.

Default: staticmethod.

pep8-naming's People

Contributors

5j9 avatar carreau avatar di avatar edwardbetts avatar f213 avatar florentx avatar frewsxcv avatar gforcada avatar jakirkham avatar janlikar avatar jparise avatar kdopen avatar lordmauve avatar mwhudson avatar pvanderlinden avatar saifelse avatar scop avatar sigmavirus24 avatar stephan-hof avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.