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

Add documentation for too-many-lines #8235

Closed
wants to merge 3 commits into from
Closed
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
16 changes: 16 additions & 0 deletions doc/data/messages/t/too-many-lines/bad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def leap_year(year): # [too-many-lines]
""" Function used to determine whether a given year is a leap year """
if year % 400 == 0:
return True
if year % 100 == 0:
return False
if year % 4 == 0:
return True
else:
return False

print(leap_year(1990))
print(leap_year(1991))
print(leap_year(1992))
print(leap_year(1993))
print(leap_year(1994))
1 change: 0 additions & 1 deletion doc/data/messages/t/too-many-lines/details.rst

This file was deleted.

14 changes: 13 additions & 1 deletion doc/data/messages/t/too-many-lines/good.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# This is a placeholder for correct code for this message.
def leap_year(year):
""" Function used to determine whether a given year is a leap year """
if year % 400 == 0:
return True
if year % 100 == 0:
return False
if year % 4 == 0:
return True
else:
return False

for year in range(1990, 1994):
print(leap_year(year))
2 changes: 2 additions & 0 deletions doc/data/messages/t/too-many-lines/pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[main]
max-module-lines = 15