[PATCH 2 of 5 saem] [views] Drop dead code

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Oct 6 17:03:55 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1507274222 -7200
#      Fri Oct 06 09:17:02 2017 +0200
# Node ID 037cd908fc92141b6cb9c3aa4f94bfe4c693d4c9
# Parent  534a551a40df5a4d1f117937ed10b1fcda59bbad
# Available At http://hg.logilab.org/review/cubes/saem_ref
#              hg pull http://hg.logilab.org/review/cubes/saem_ref -r 037cd908fc92
[views] Drop dead code

diff --git a/cubicweb_saem_ref/views/__init__.py b/cubicweb_saem_ref/views/__init__.py
--- a/cubicweb_saem_ref/views/__init__.py
+++ b/cubicweb_saem_ref/views/__init__.py
@@ -13,11 +13,10 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """cubicweb-saem-ref views/forms/actions/components for web ui"""
 
-from copy import deepcopy
 from functools import wraps
 
 from logilab.common.decorators import monkeypatch
 from logilab.mtconverter import xml_escape
 from logilab.common.registry import yes
@@ -53,21 +52,10 @@ abaa.tag_subject_of(('*', 'use_email', '
 abaa.tag_subject_of(('*', 'phone_number', '*'), False)
 
 affk.set_field_kwargs('*', 'ark', widget=fw.TextInput({'size': 80}), required=False)
 
 
-def selectable_uicfg(rtag, modname, select):
-    """Return a copy of uicfg `rtag` with `select` set.
-
-    Usually `modname` should be set to ``__name__`` from the caller.
-    """
-    copy = deepcopy(rtag)
-    copy.__module__ = modname
-    copy.__select__ = select
-    return copy
-
-
 def external_link(text, href):
     """Return an HTML link with an icon indicating that the URL is external.
     """
     icon = tags.span(klass="glyphicon glyphicon-share-alt")
     return tags.a(u' '.join([text, icon]), href=href, escapecontent=False)


More information about the saem-devel mailing list