diff options
author | Laurent Peuch <cortex@worlddomination.be> | 2019-07-03 23:52:10 +0200 |
---|---|---|
committer | Laurent Peuch <cortex@worlddomination.be> | 2019-07-03 23:52:10 +0200 |
commit | 68d576822231a8c4383d1c0d85d642f4622accc2 (patch) | |
tree | e3e5a257cca8be47682513726cef3fb110c1cd37 | |
parent | 397379ff4de97aa56a2386c0f1e03f60c5754d3c (diff) | |
download | logilab-common-68d576822231a8c4383d1c0d85d642f4622accc2.tar.gz |
[doc] fix sphinx warnings
-rw-r--r-- | logilab/common/configuration.py | 2 | ||||
-rw-r--r-- | logilab/common/interface.py | 5 | ||||
-rw-r--r-- | logilab/common/table.py | 48 |
3 files changed, 36 insertions, 19 deletions
diff --git a/logilab/common/configuration.py b/logilab/common/configuration.py index 7a54f1a..1137332 100644 --- a/logilab/common/configuration.py +++ b/logilab/common/configuration.py @@ -27,7 +27,7 @@ extension in the `optik_ext` module). Quick start: simplest usage --------------------------- -.. python :: +.. :: >>> import sys >>> from logilab.common.configuration import Configuration diff --git a/logilab/common/interface.py b/logilab/common/interface.py index 3ea4ab7..7cf1027 100644 --- a/logilab/common/interface.py +++ b/logilab/common/interface.py @@ -18,11 +18,10 @@ """Bases class for interfaces to provide 'light' interface handling. TODO: - _ implements a check method which check that an object implements the - interface + _ implements a check method which check that an object implements the interface _ Attribute objects - This module requires at least python 2.2 +This module requires at least python 2.2 """ __docformat__ = "restructuredtext en" diff --git a/logilab/common/table.py b/logilab/common/table.py index 2f3df69..6e22c65 100644 --- a/logilab/common/table.py +++ b/logilab/common/table.py @@ -25,7 +25,8 @@ from six.moves import range class Table(object): """Table defines a data table with column and row names. - inv: + inv:: + len(self.data) <= len(self.row_names) forall(self.data, lambda x: len(x) <= len(self.col_names)) """ @@ -175,7 +176,8 @@ class Table(object): def set_row(self, row_index, row_data): """sets the 'row_index' row - pre: + pre:: + type(row_data) == types.ListType len(row_data) == len(self.col_names) """ @@ -184,9 +186,11 @@ class Table(object): def set_row_by_id(self, row_id, row_data): """sets the 'row_id' column - pre: + pre:: + type(row_data) == types.ListType len(row_data) == len(self.row_names) + Raises a KeyError if row_id is not found """ try: @@ -198,7 +202,8 @@ class Table(object): def append_row(self, row_data, row_name=None): """Appends a row to the table - pre: + pre:: + type(row_data) == types.ListType len(row_data) == len(self.col_names) """ @@ -211,7 +216,8 @@ class Table(object): """Appends row_data before 'index' in the table. To make 'insert' behave like 'list.insert', inserting in an out of range index will insert row_data to the end of the list - pre: + pre:: + type(row_data) == types.ListType len(row_data) == len(self.col_names) """ @@ -241,7 +247,8 @@ class Table(object): def set_column(self, col_index, col_data): """sets the 'col_index' column - pre: + pre:: + type(col_data) == types.ListType len(col_data) == len(self.row_names) """ @@ -252,9 +259,11 @@ class Table(object): def set_column_by_id(self, col_id, col_data): """sets the 'col_id' column - pre: + pre:: + type(col_data) == types.ListType len(col_data) == len(self.col_names) + Raises a KeyError if col_id is not found """ try: @@ -266,7 +275,8 @@ class Table(object): def append_column(self, col_data, col_name): """Appends the 'col_index' column - pre: + pre:: + type(col_data) == types.ListType len(col_data) == len(self.row_names) """ @@ -279,7 +289,8 @@ class Table(object): """Appends col_data before 'index' in the table. To make 'insert' behave like 'list.insert', inserting in an out of range index will insert col_data to the end of the list - pre: + pre:: + type(col_data) == types.ListType len(col_data) == len(self.row_names) """ @@ -630,9 +641,12 @@ class TableStyleSheet: and col_index separated by an underscore ('_'). For example, suppose you want to say that the (2,5) cell must be the sum of its two preceding cells in the row, you would create - the following rule : + the following rule :: + 2_5 = 2_3 + 2_4 - You can also use all the math.* operations you want. For example: + + You can also use all the math.* operations you want. For example:: + 2_5 = sqrt(2_3**2 + 2_4**2) """ @@ -662,7 +676,8 @@ class TableStyleSheet: start_col to end_col. dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. - pre: + pre:: + start_col >= 0 end_col > start_col """ @@ -677,7 +692,8 @@ class TableStyleSheet: to end_col) dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. - pre: + pre:: + start_col >= 0 end_col > start_col """ @@ -693,7 +709,8 @@ class TableStyleSheet: start_row to end_row. dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. - pre: + pre:: + start_row >= 0 end_row > start_row """ @@ -708,7 +725,8 @@ class TableStyleSheet: to end_row) dest_cell is a tuple of two elements (x,y) of the destination cell No check is done for indexes ranges. - pre: + pre:: + start_row >= 0 end_row > start_row """ |