From ccd4a235a136d696c102840ffa34a32e7b4e4054 Mon Sep 17 00:00:00 2001 From: legac <renaud.legac@free.fr> Date: Sat, 11 Apr 2015 13:58:38 +0200 Subject: [PATCH] Fix orphan type/param/keyword, type and param have to defined. --- modules/plugin_dbui/callback.py | 1 - modules/plugin_dbui/converter.py | 19 +++++++++++++++---- modules/plugin_dbui/directsvc.py | 2 +- modules/plugin_dbui/extjs.py | 5 +++-- modules/plugin_dbui/gridmodifier.py | 15 ++++++++++----- modules/plugin_dbui/helper.py | 12 ++++++++++-- modules/plugin_dbui/mapper.py | 1 + modules/plugin_dbui/selector.py | 5 +++++ modules/plugin_dbui/storemodifier.py | 1 + 9 files changed, 46 insertions(+), 15 deletions(-) diff --git a/modules/plugin_dbui/callback.py b/modules/plugin_dbui/callback.py index 17303a47..64601599 100644 --- a/modules/plugin_dbui/callback.py +++ b/modules/plugin_dbui/callback.py @@ -57,4 +57,3 @@ def INHIBIT_UPDATE_UNDEF(set, values): return True return False - diff --git a/modules/plugin_dbui/converter.py b/modules/plugin_dbui/converter.py index 11d8b888..6b12a001 100644 --- a/modules/plugin_dbui/converter.py +++ b/modules/plugin_dbui/converter.py @@ -52,8 +52,8 @@ def _to_field(field, linkedcombo=True, **kwargs): The conversion takes into account the L{FieldsModifier} instructions but does not handle ``FieldContainer``. - :param field: :type field: gluon.dal.Field + :param field: :type linkedcombo: bool :param linkedcombo: @@ -198,7 +198,8 @@ def to_field(field, composite=True, linkedcombo=True, **kwargs): :param linkedcombo: ``LinkedComboBox`` are ignored when ``False``. Useful to build grid filter. - + + :type kwargs: dict :param kwargs: any Ext JS configuration parameter of the ``Ext.form.Field`` class. They are applied in the following order: @@ -266,6 +267,8 @@ def to_fields(table): respectively. :type table: gluon.dal.Table + :param table: + :returns: list """ @@ -338,6 +341,7 @@ def to_formPanel(table, **kwargs): :type table: gluon.dal.Table :param table: + :type kwargs: dict :param kwargs: any Ext JS configuration parameter of the ``Ext.form.Panel`` class. They are @@ -374,6 +378,7 @@ def to_gridColumn(field, **kwargs): :type field: gluon.dal.Field :param field: + :type kwargs: dict :param kwargs: any Ext JS configuration parameter of the ``Ext.grid.Column`` class. @@ -480,6 +485,7 @@ def to_gridFilter(table, **kwargs): :type table: gluon.dal.Table :param table: + :type kwargs: dict :keyword kwargs: any of the Ext JS configuration parameters of the ``App.grid.Filter`` class. They are applied in the following order: @@ -599,6 +605,7 @@ def to_gridPanel(table, **kwargs): :type table: gluon.dal.Table :param table: + :type kwargs: dict :keyword kwargs: any of the Ext JS configuration parameters of the ``App.grid.Panel`` class. They are applied in the following order: @@ -644,6 +651,7 @@ def to_jsonstore(table, **kwargs): :type table: gluon.dal.Table :param table: + :type kwargs: dict :keyword kwargs: any of the Ext JS configuration parameters of the ``App.data.DirectStore`` class. They are applied in the following order: @@ -785,12 +793,14 @@ def to_panelWithUrlSelector(table, selectorTitle='Select', **kwargs): the title of the FieldSet encapsulating the selector fields. - :keyword baseUrl: + :type baseUrl: str + :param baseUrl: The selected values are send to a controller defined by the baseUrl. Values are processed and results will be published in the panel. It is mandatory to specified the baseUrl. - + + :type kwargs: dict :keyword kwargs: any of the Ext JS configuration parameters of the ``App.panel.WithUrlSelector`` class. @@ -842,6 +852,7 @@ def to_viewport(**kwargs): """Build the ``Ext.Viewport`` configuration. The conversion takes into account the L{ViewportModifier} instructions. + :type kwargs: dict :keyword kwargs: any of the Ext JS configuration parameters of the ``App.viewport.Viewport`` class. diff --git a/modules/plugin_dbui/directsvc.py b/modules/plugin_dbui/directsvc.py index 94e1a726..683adfcc 100644 --- a/modules/plugin_dbui/directsvc.py +++ b/modules/plugin_dbui/directsvc.py @@ -136,10 +136,10 @@ class DirectSvc(BaseSvc): def myfunction(a, b): :type f: function + :param f: :returns: function -- the input argument - """ # a procedure is registered as 'action.method' diff --git a/modules/plugin_dbui/extjs.py b/modules/plugin_dbui/extjs.py index 66777d9f..6ad95823 100644 --- a/modules/plugin_dbui/extjs.py +++ b/modules/plugin_dbui/extjs.py @@ -27,10 +27,11 @@ class Base(Storage): def __init__(self, **kwargs): """ + :type kwargs: dict :keyword kwargs: any Ext JS configuration parameter of the target class - :raise ExtJSException: if the keyword ``xtype`` - is in the keyword arguments. + :raise ExtJSException: + if the keyword ``xtype`` is in the keyword arguments. """ if 'xtype' in kwargs: diff --git a/modules/plugin_dbui/gridmodifier.py b/modules/plugin_dbui/gridmodifier.py index 428eb159..d4c0c15a 100644 --- a/modules/plugin_dbui/gridmodifier.py +++ b/modules/plugin_dbui/gridmodifier.py @@ -207,10 +207,12 @@ class GridModifier(Modifier): The TemplateColumn is rendered by the ``Ext.grid.TemplateColumn``. Each field is identified by its database field name. - :keyword header: (str) the header of the TemplateColumn + :type header: str + :keyword header: the header of the TemplateColumn + :type tpl: list :keyword tpl: - (list) the template defining how fields are displayed + the template defining how fields are displayed in the TemplateColumn. - The syntax of the template is is defined in the documentation @@ -226,17 +228,20 @@ class GridModifier(Modifier): '{PeopleFirst_name}<br>', '<tpl if={PeoplePhone_number}>{PeoplePhone_number}</tpl>'] + :type autohide: bool :keyword autohide: - (bool) hide the columns associated to the fields + hide the columns associated to the fields used in the TemplateColumn when set to ``True``. + :type position: int :keyword position: - (int) is a number defining where the + is a number defining where the column will be inserted in the grid widget. The first column is at 0. + :type extjs: dict :keyword extjs: - (dict) contains the Ext JS configuration options + contains the Ext JS configuration options of the ``Ext.grid.TemplateColumn``. """ diff --git a/modules/plugin_dbui/helper.py b/modules/plugin_dbui/helper.py index b3f2fba9..1f1eb557 100644 --- a/modules/plugin_dbui/helper.py +++ b/modules/plugin_dbui/helper.py @@ -65,6 +65,7 @@ def decode_field(field): ``"TableField"`` or ``"TableFieldFunction"`` :type field: str + :param field: :returns: tuple @@ -187,6 +188,7 @@ def get_create_id(table, **kwargs): id = get_create_id(db.person, first_name="Joe", last_name="Doe") :type table: gluon.dal.Table + :param table: :returns: int -- the ``id`` of the record. @@ -204,6 +206,7 @@ def get_field_validators(field): database gluon.dal.Field validators on the client-side. :type field: gluon.dal.Field + :param field: :returns: dict -- The keys depend on the validators. @@ -373,6 +376,7 @@ def get_id(table, **kwargs): keyword arguments. Return ``None`` if the record does not exist. :type table: gluon.dal.Table + :param table: :returns: int or None -- the ``id`` of the record. @@ -501,7 +505,6 @@ def get_script_path(plugin): :type plugin: plugin instance :param plugin: - :rtype: str :returns: str @@ -537,6 +540,8 @@ def get_store_id(name): """Build the store identifier using ``name``. :type name: str + :param name: + :returns: str -- ``nameStore`` """ @@ -695,6 +700,7 @@ def is_set_field(field): should matches those of a ``set``. :type field: gluon.dal.Field + :param field: :returns: bool @@ -713,6 +719,7 @@ def is_table_with_foreign_fields(table): one reference field. :type table: gluon.dal.Table + :param table: :returns: bool @@ -729,7 +736,8 @@ def rows_serializer(rows): table and where function are applied. :type rows: gluon.dal.Rows - + :param rows: + :returns: list diff --git a/modules/plugin_dbui/mapper.py b/modules/plugin_dbui/mapper.py index d22bd832..f52f4f5c 100644 --- a/modules/plugin_dbui/mapper.py +++ b/modules/plugin_dbui/mapper.py @@ -23,6 +23,7 @@ def map_tabpanel(fieldsets): - the name of the tab is the name of the fieldset. :type fieldsets: list of FieldSet + :param fieldsets: :returns: list -- the ``TapPanel`` encapsulated in a list. diff --git a/modules/plugin_dbui/selector.py b/modules/plugin_dbui/selector.py index a441cd72..882b1906 100644 --- a/modules/plugin_dbui/selector.py +++ b/modules/plugin_dbui/selector.py @@ -119,6 +119,7 @@ class Selector(Storage): and database select operations. :type query: gluon.dal.Query + :param query: """ self._extra_queries.append(query) @@ -159,6 +160,7 @@ class Selector(Storage): tuple are not take into account in the query. :type table: gluon.dal.Table + :param table: :returns: gluon.dal.Query @@ -231,10 +233,13 @@ class Selector(Storage): - It returns Rows which contains reference tables and columns. :type table: gluon.dal.Table + :param table: + :type args: list :param args: field with operator (avg, count, max, min and sum) + :type kwargs: dict :param kwargs: The keyword arguments are those of the gluon.dal.Set.select method: orderby, groupby, .... diff --git a/modules/plugin_dbui/storemodifier.py b/modules/plugin_dbui/storemodifier.py index 8cb677a6..4d59d546 100644 --- a/modules/plugin_dbui/storemodifier.py +++ b/modules/plugin_dbui/storemodifier.py @@ -112,6 +112,7 @@ class StoreModifier(Modifier): That means that only 5 pages are kept in the cache. Therefore this is a good option to manipulate almost infinite set of data. + :type kwargs: dict :param kwargs: Any configuration parameter of the ``Ext.data.Store``. Those related to the buffering are ``buffered``, ``clearOnPaqgeLoad``, -- GitLab