From f81b756f78b18c40e21dc7486cea3b2cd15facf8 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 8 Mar 2015 22:08:44 +0100 Subject: [PATCH] Updated evtable docs --- evennia/objects/objects.py | 3 ++- evennia/utils/evtable.py | 36 +++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/evennia/objects/objects.py b/evennia/objects/objects.py index bb1c9bc534..43005cbfe2 100644 --- a/evennia/objects/objects.py +++ b/evennia/objects/objects.py @@ -1,5 +1,6 @@ """ -This is the basis of the typeclass system. +This model defines the basic Object and its children, typeclasses used +for all in-game entities. The idea is have the object as a normal class with the database-connection tied to itself through a property. diff --git a/evennia/utils/evtable.py b/evennia/utils/evtable.py index 6a7eef0b87..13095adb05 100644 --- a/evennia/utils/evtable.py +++ b/evennia/utils/evtable.py @@ -868,13 +868,13 @@ class EvColumn(object): Args: Texts for the new cells - - Kwargs: ypos (int, optional): Index position in table before which to insert the new column. Uses Python indexing, so to insert at the top, use `ypos=0`. If not given, data will be inserted at the end of the column. - kwargs (various, optional): Available keywods as per `EvCell.__init__`. + + Kwargs: + Available keywods as per `EvCell.__init__`. """ ypos = kwargs.get("ypos", None) @@ -1067,7 +1067,7 @@ class EvTable(object): # balance the table #self._balance() - def _cellborders(self, ix, iy, nx, ny, kwargs): + def _cellborders(self, ix, iy, nx, ny, **kwargs): """ Adds borders to the table by adjusting the input kwarg to instruct cells to build a border in the right positions. @@ -1077,7 +1077,9 @@ class EvTable(object): iy (int): y index positions in table. nx (int): x size of table. ny (int): y size of table. - kwargs (various, optional): Keywords as per `EvTable.__init__`. + + Kwargs: + Keywords as per `EvTable.__init__`. Returns: table (str): string with the correct borders. @@ -1337,8 +1339,11 @@ class EvTable(object): Args: args (str): These strings will be used as the header texts. - kwawrgs (various, optional): Same keywords as per `EvTable.__init__`. Will - be applied to the new header's cells. + + Kwargs: + Same keywords as per `EvTable.__init__`. Will be applied + to the new header's cells. + """ self.header = True self.add_row(ypos=0, *args, **kwargs) @@ -1358,7 +1363,9 @@ class EvTable(object): xpos (int, optional): Index position in table *before* which to input new column. If not given, column will be added to the end of the table. Uses Python indexing (so first column is `xpos=0`) - kwargs (various, optional): Same keywords as per `Cell.__init__`. + + Kwargs: + Other keywords as per `Cell.__init__`. """ # this will replace default options with new ones without changing default @@ -1414,7 +1421,9 @@ class EvTable(object): ypos (int, optional): Index position in table before which to input new row. If not given, will be added to the end of the table. Uses Python indexing (so first row is `ypos=0`) - kwargs (various, optional): Available keywords are as per `EvCell.__init__`. + + Kwargs: + Other keywords are as per `EvCell.__init__`. """ # this will replace default options with new ones without changing default @@ -1452,9 +1461,8 @@ class EvTable(object): """ Force a re-shape of the entire table. - Args: - kwargs (various, optional): Table options as per - `EvTable.__init__`. + Kwargs: + Table options as per `EvTable.__init__`. """ self.width = kwargs.pop("width", self.width) @@ -1484,7 +1492,9 @@ class EvTable(object): Args: index (int): Which column to reformat. The column index is given from 0 to Ncolumns-1. - kwargs (various, optional): Column options as per `EvCell.__init__`. + + Kwargs: + Column options as per `EvCell.__init__`. Raises: Exception: if an invalid index is found.