Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Move the naming-style documentation to invalid-name doc #6669

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"messages/messages_list": "../user_guide/messages/messages_overview.html",
"user_guide/message-control": "messages/message_control.html",
"technical_reference/c_extensions": "../user_guide/messages/error/no-member.html",
"user_guide/configuration/naming-styles": "../user_guide/messages/convention/invalid-name.html",
"development/testing": "tests/index.html",
}

Expand Down
8 changes: 8 additions & 0 deletions doc/data/messages/i/invalid-name/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class cat: # [invalid-name]

def Meow(self, NUMBER_OF_MEOW): # [invalid-name, invalid-name]
print("Meow" * NUMBER_OF_MEOW)
return NUMBER_OF_MEOW


Cat = cat().Meow(42) # [invalid-name]
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
.. -*- coding: utf-8 -*-

===============
Naming styles
===============

Introduction
~~~~~~~~~~~~

Pylint recognizes a number of different name types internally. With a few
exceptions, the type of the name is governed by the location the assignment to a
name is found in, and not the type of object assigned.
Expand Down
8 changes: 8 additions & 0 deletions doc/data/messages/i/invalid-name/good.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Cat:

def meow(self, number_of_meow):
print("Meow" * number_of_meow)
return number_of_meow


CAT = Cat().meow(42)
Empty file.
1 change: 0 additions & 1 deletion doc/user_guide/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ Configuration
:titlesonly:

configuration/all-options
configuration/naming-styles