pep8-naming


Namepep8-naming JSON
Version 0.13.3 PyPI version JSON
download
home_pagehttps://github.com/PyCQA/pep8-naming
SummaryCheck PEP-8 naming conventions, plugin for flake8
upload_time2022-12-19 20:45:27
maintainer
docs_urlNone
authorFlorent Xicluna
requires_python>=3.7
licenseExpat license
keywords flake8 pep8 naming
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PEP 8 Naming Conventions
========================

Check your code against `PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_
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
  4.0.1 (mccabe: 0.6.1, naming: 0.13.0, pycodestyle: 2.8.0, pyflakes: 2.4.0) CPython 3.8.10 on Linux

By default the plugin is enabled.

Error Codes
-----------

These error codes are emitted:

+---------+-----------------------------------------------------------------+
| code    | sample message                                                  |
+=========+=================================================================+
| _`N801` | class names should use CapWords convention (`class names`_)     |
+---------+-----------------------------------------------------------------+
| _`N802` | function name should be lowercase (`function names`_)           |
+---------+-----------------------------------------------------------------+
| _`N803` | argument name should be lowercase (`function arguments`_)       |
+---------+-----------------------------------------------------------------+
| _`N804` | first argument of a classmethod should be named 'cls'           |
|         | (`function arguments`_)                                         |
+---------+-----------------------------------------------------------------+
| _`N805` | first argument of a method should be named 'self'               |
|         | (`function arguments`_)                                         |
+---------+-----------------------------------------------------------------+
| _`N806` | variable in function should be lowercase                        |
+---------+-----------------------------------------------------------------+
| _`N807` | function name should not start and end with '__'                |
+---------+-----------------------------------------------------------------+
| _`N811` | constant imported as non constant (`constants`_)                |
+---------+-----------------------------------------------------------------+
| _`N812` | lowercase imported as non-lowercase                             |
+---------+-----------------------------------------------------------------+
| _`N813` | camelcase imported as lowercase                                 |
+---------+-----------------------------------------------------------------+
| _`N814` | camelcase imported as constant                                  |
|         | (distinct from `N817`_ for selective enforcement)               |
+---------+-----------------------------------------------------------------+
| _`N815` | mixedCase variable in class scope                               |
|         | (`constants`_, `method names`_)                                 |
+---------+-----------------------------------------------------------------+
| _`N816` | mixedCase variable in global scope (`constants`_)               |
+---------+-----------------------------------------------------------------+
| _`N817` | camelcase imported as acronym                                   |
|         | (distinct from `N814`_ for selective enforcement)               |
+---------+-----------------------------------------------------------------+
| _`N818` | error suffix in exception names (`exceptions`_)                 |
+---------+-----------------------------------------------------------------+

.. _class names: https://www.python.org/dev/peps/pep-0008/#class-names
.. _constants: https://www.python.org/dev/peps/pep-0008/#constants
.. _exceptions: https://www.python.org/dev/peps/pep-0008/#exception-names
.. _function names: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names
.. _function arguments: https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments
.. _method names: https://www.python.org/dev/peps/pep-0008/#method-names-and-instance-variables

Options
-------

The following flake8 options are added:

--ignore-names              Ignore errors for specific names or glob patterns.

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

                            Default: ``setUp,tearDown,setUpClass,tearDownClass,setUpModule,tearDownModule,asyncSetUp,asyncTearDown,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``.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PyCQA/pep8-naming",
    "name": "pep8-naming",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "flake8 pep8 naming",
    "author": "Florent Xicluna",
    "author_email": "florent.xicluna@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/c0/0db8b2867395a9a137e86af8bdf5a566e41d9c6453e509cd3042419ae29e/pep8-naming-0.13.3.tar.gz",
    "platform": null,
    "description": "PEP 8 Naming Conventions\n========================\n\nCheck your code against `PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_\nnaming conventions.\n\nThis module provides a plugin for ``flake8``, the Python code checker.\n\n(It replaces the plugin ``flint-naming`` for the ``flint`` checker.)\n\n\nInstallation\n------------\n\nYou can install, upgrade, uninstall ``pep8-naming`` with these commands::\n\n  $ pip install pep8-naming\n  $ pip install --upgrade pep8-naming\n  $ pip uninstall pep8-naming\n\n\nPlugin for Flake8\n-----------------\n\nWhen both ``flake8`` and ``pep8-naming`` are installed, the plugin is\navailable in ``flake8``::\n\n  $ flake8 --version\n  4.0.1 (mccabe: 0.6.1, naming: 0.13.0, pycodestyle: 2.8.0, pyflakes: 2.4.0) CPython 3.8.10 on Linux\n\nBy default the plugin is enabled.\n\nError Codes\n-----------\n\nThese error codes are emitted:\n\n+---------+-----------------------------------------------------------------+\n| code    | sample message                                                  |\n+=========+=================================================================+\n| _`N801` | class names should use CapWords convention (`class names`_)     |\n+---------+-----------------------------------------------------------------+\n| _`N802` | function name should be lowercase (`function names`_)           |\n+---------+-----------------------------------------------------------------+\n| _`N803` | argument name should be lowercase (`function arguments`_)       |\n+---------+-----------------------------------------------------------------+\n| _`N804` | first argument of a classmethod should be named 'cls'           |\n|         | (`function arguments`_)                                         |\n+---------+-----------------------------------------------------------------+\n| _`N805` | first argument of a method should be named 'self'               |\n|         | (`function arguments`_)                                         |\n+---------+-----------------------------------------------------------------+\n| _`N806` | variable in function should be lowercase                        |\n+---------+-----------------------------------------------------------------+\n| _`N807` | function name should not start and end with '__'                |\n+---------+-----------------------------------------------------------------+\n| _`N811` | constant imported as non constant (`constants`_)                |\n+---------+-----------------------------------------------------------------+\n| _`N812` | lowercase imported as non-lowercase                             |\n+---------+-----------------------------------------------------------------+\n| _`N813` | camelcase imported as lowercase                                 |\n+---------+-----------------------------------------------------------------+\n| _`N814` | camelcase imported as constant                                  |\n|         | (distinct from `N817`_ for selective enforcement)               |\n+---------+-----------------------------------------------------------------+\n| _`N815` | mixedCase variable in class scope                               |\n|         | (`constants`_, `method names`_)                                 |\n+---------+-----------------------------------------------------------------+\n| _`N816` | mixedCase variable in global scope (`constants`_)               |\n+---------+-----------------------------------------------------------------+\n| _`N817` | camelcase imported as acronym                                   |\n|         | (distinct from `N814`_ for selective enforcement)               |\n+---------+-----------------------------------------------------------------+\n| _`N818` | error suffix in exception names (`exceptions`_)                 |\n+---------+-----------------------------------------------------------------+\n\n.. _class names: https://www.python.org/dev/peps/pep-0008/#class-names\n.. _constants: https://www.python.org/dev/peps/pep-0008/#constants\n.. _exceptions: https://www.python.org/dev/peps/pep-0008/#exception-names\n.. _function names: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names\n.. _function arguments: https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments\n.. _method names: https://www.python.org/dev/peps/pep-0008/#method-names-and-instance-variables\n\nOptions\n-------\n\nThe following flake8 options are added:\n\n--ignore-names              Ignore errors for specific names or glob patterns.\n\n                            Currently, this option can only be used for N802, N803, N804, N805, N806, N815, and N816 errors.\n\n                            Default: ``setUp,tearDown,setUpClass,tearDownClass,setUpModule,tearDownModule,asyncSetUp,asyncTearDown,setUpTestData,failureException,longMessage,maxDiff``.\n\n--classmethod-decorators    List of method decorators pep8-naming plugin should consider class method.\n\n                            Used to prevent false N804 errors.\n\n                            Default: ``classmethod``.\n\n--staticmethod-decorators   List of method decorators pep8-naming plugin should consider static method.\n\n                            Used to prevent false N805 errors.\n\n                            Default: ``staticmethod``.\n",
    "bugtrack_url": null,
    "license": "Expat license",
    "summary": "Check PEP-8 naming conventions, plugin for flake8",
    "version": "0.13.3",
    "split_keywords": [
        "flake8",
        "pep8",
        "naming"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "804bfb1a85eaff93ca874b48ce709fd2",
                "sha256": "1a86b8c71a03337c97181917e2b472f0f5e4ccb06844a0d6f0a33522549e7a80"
            },
            "downloads": -1,
            "filename": "pep8_naming-0.13.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "804bfb1a85eaff93ca874b48ce709fd2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8490,
            "upload_time": "2022-12-19T20:45:25",
            "upload_time_iso_8601": "2022-12-19T20:45:25.132729Z",
            "url": "https://files.pythonhosted.org/packages/4f/48/9533518e0394fb858ac2b4b55fe18f24aa33c87c943f691336ec842d9728/pep8_naming-0.13.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "0d811e9ca1b71555efbf7be8744785bf",
                "sha256": "1705f046dfcd851378aac3be1cd1551c7c1e5ff363bacad707d43007877fa971"
            },
            "downloads": -1,
            "filename": "pep8-naming-0.13.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0d811e9ca1b71555efbf7be8744785bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16129,
            "upload_time": "2022-12-19T20:45:27",
            "upload_time_iso_8601": "2022-12-19T20:45:27.158596Z",
            "url": "https://files.pythonhosted.org/packages/5b/c0/0db8b2867395a9a137e86af8bdf5a566e41d9c6453e509cd3042419ae29e/pep8-naming-0.13.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-19 20:45:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "PyCQA",
    "github_project": "pep8-naming",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pep8-naming"
}
        
Elapsed time: 0.02137s