Pylint warning Line too long fix
Changes:
- Fix 0301: Line too long directives in the code
Tested:
- python3 -m pylint lib/tally_sheet.py
Change-Id: I0065779bc5abe00f26a9aa81dd1ce2d1fce753bb
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/tally_sheet.py b/lib/tally_sheet.py
index 52ed279..2994907 100755
--- a/lib/tally_sheet.py
+++ b/lib/tally_sheet.py
@@ -19,7 +19,8 @@
class tally_sheet:
r"""
- This class is the implementation of a tally sheet. The sheet can be viewed as rows and columns. Each
+ This class is the implementation of a tally sheet.
+ The sheet can be viewed as rows and columns. Each
row has a unique key field.
This class provides methods to tally the results (totals, etc.).
@@ -81,8 +82,9 @@
# The row key field uniquely identifies the row.
self.__row_key_field_name = row_key_field_name
# Create a "table" which is an ordered dictionary.
- # If we're running python 2.7 or later, collections has an OrderedDict we can use. Otherwise, we'll
- # try to use the DotDict (a robot library). If neither of those are available, we fail.
+ # If we're running python 2.7 or later, collections has an OrderedDict
+ # we can use. Otherwise, we'll try to use the DotDict (a robot library).
+ # If neither of those are available, we fail.
try:
self.__table = collections.OrderedDict()
except AttributeError:
@@ -102,8 +104,8 @@
def set_sum_fields(self, sum_fields):
r"""
- Set the sum fields, i.e. create a list of field names which are to be summed and included on the
- totals line of reports.
+ Set the sum fields, i.e. create a list of field names which are to be
+ summed and included on the totals line of reports.
Description of arguments:
sum_fields A list of field names.
@@ -113,12 +115,14 @@
def set_calc_fields(self, calc_fields):
r"""
- Set the calc fields, i.e. create a list of field names within a given row which are to be calculated
+ Set the calc fields, i.e. create a list of field names within a given
+ row which are to be calculated
for the user.
Description of arguments:
- calc_fields A string expression such as 'total=pass+fail' which shows which field on
- a given row is derived from other fields in the same row.
+ calc_fields A string expression such as 'total=pass+fail'
+ which shows which field on a given row is
+ derived from other fields in the same row.
"""
self.__calc_fields = calc_fields
@@ -128,11 +132,13 @@
Add a row to the tally sheet.
Description of arguments:
- row_key A unique key value.
- init_fields_dict A dictionary of field names/initial values. The number of fields in this
- dictionary must be the same as what was specified when the tally sheet
- was created. If no value is passed, the value used to create the tally
- sheet will be used.
+ row_key A unique key value.
+ init_fields_dict A dictionary of field names/initial values.
+ The number of fields in this dictionary must
+ be the same as what was specified when the
+ tally sheet was created. If no value is passed,
+ the value used to create the tally sheet will
+ be used.
"""
if row_key in self.__table:
@@ -152,33 +158,40 @@
Update a field in a row with the specified value.
Description of arguments:
- row_key A unique key value that identifies the row to be updated.
- field_key The key that identifies which field in the row that is to be updated.
- value The value to set into the specified row/field.
+ row_key A unique key value that identifies the row to
+ be updated.
+ field_key The key that identifies which field in the row
+ that is to be updated.
+ value The value to set into the specified row/field.
"""
self.__table[row_key][field_key] = value
def inc_row_field(self, row_key, field_key):
r"""
- Increment the value of the specified field in the specified row. The value of the field must be
- numeric.
+ Increment the value of the specified field in the specified row.
+ The value of the field must be numeric.
Description of arguments:
- row_key A unique key value that identifies the row to be updated.
- field_key The key that identifies which field in the row that is to be updated.
+ row_key A unique key value that identifies the row to
+ be updated.
+ field_key The key that identifies which field in the row
+ that is to be updated.
"""
self.__table[row_key][field_key] += 1
def dec_row_field(self, row_key, field_key):
r"""
- Decrement the value of the specified field in the specified row. The value of the field must be
+ Decrement the value of the specified field in the specified row.
+ The value of the field must be
numeric.
Description of arguments:
- row_key A unique key value that identifies the row to be updated.
- field_key The key that identifies which field in the row that is to be updated.
+ row_key A unique key value that identifies the row to
+ be updated.
+ field_key The key that identifies which field in the row
+ that is to be updated.
"""
self.__table[row_key][field_key] -= 1