{"id":18468765,"url":"https://github.com/pycqa/pep8-naming","last_synced_at":"2025-05-13T19:14:42.449Z","repository":{"id":6864261,"uuid":"8113165","full_name":"PyCQA/pep8-naming","owner":"PyCQA","description":"Naming Convention checker for Python","archived":false,"fork":false,"pushed_at":"2025-05-06T21:53:54.000Z","size":250,"stargazers_count":521,"open_issues_count":21,"forks_count":236,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-12T00:07:29.144Z","etag":null,"topics":["flake8","flake8-extensions","flake8-plugin","linter-flake8","linter-plugin","naming-conventions","pep8","python"],"latest_commit_sha":null,"homepage":"pypi.python.org/pypi/pep8-naming","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyCQA.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-02-09T18:32:52.000Z","updated_at":"2025-05-07T08:58:55.000Z","dependencies_parsed_at":"2023-07-12T14:51:07.011Z","dependency_job_id":"7d9885d4-9941-4e02-8143-8f36289c2381","html_url":"https://github.com/PyCQA/pep8-naming","commit_stats":{"total_commits":195,"total_committers":36,"mean_commits":5.416666666666667,"dds":0.6615384615384615,"last_synced_commit":"975beede1be69afa9c39622825d80fb5827a6570"},"previous_names":["flintwork/pep8-naming"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fpep8-naming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fpep8-naming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fpep8-naming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fpep8-naming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyCQA","download_url":"https://codeload.github.com/PyCQA/pep8-naming/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010818,"owners_count":21998995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flake8","flake8-extensions","flake8-plugin","linter-flake8","linter-plugin","naming-conventions","pep8","python"],"created_at":"2024-11-06T10:08:06.241Z","updated_at":"2025-05-13T19:14:42.424Z","avatar_url":"https://github.com/PyCQA.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PEP 8 Naming Conventions\n========================\n\nCheck your code against `PEP 8 \u003chttps://www.python.org/dev/peps/pep-0008/\u003e`_\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| _`N808` | type variable names should use CapWords convention and an       |\n|         | optional '_co' or '_contra' suffix (`type variable names`_)     |\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.. _type variable names: https://peps.python.org/pep-0008/#type-variable-names\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\nFAQ\n---\n\nHow do I configure ``classmethod_decorators`` to recognize `SQLAlchemy`_ class methods?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n    classmethod_decorators =\n        classmethod\n        declared_attr\n        expression\n        comparator\n\n.. _SQLAlchemy: https://www.sqlalchemy.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fpep8-naming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycqa%2Fpep8-naming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fpep8-naming/lists"}