##// END OF EJS Templates
Merge pull request #3514 from minrk/ui-state-disabled...
Merge pull request #3514 from minrk/ui-state-disabled use bootstrap `disabled` instead of `ui-state-disabled`

File last commit:

r11088:a50cba11
r11138:0ab1d3d4 merge
Show More
datatypefilter.py
33 lines | 1.2 KiB | text/x-python | PythonLexer
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 """Filter used to select the first preferred output format available.
Jonathan Frederic
Transformer refactor
r10436
The filter contained in the file allows the converter templates to select
the output format that is most valuable to the active export format. The
value of the different formats is set via
GlobalConfigurable.display_data_priority
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Classes and functions
#-----------------------------------------------------------------------------
Jonathan Frederic
Fixed spacing
r10691
Matthias BUSSONNIER
restore globalconfigurable
r10859 from ..utils.config import GlobalConfigurable
Brian E. Granger
Fixing import logic.
r11088 __all__ = ['DataTypeFilter']
Matthias BUSSONNIER
restore globalconfigurable
r10859 class DataTypeFilter(GlobalConfigurable):
Jonathan Frederic
Fixed all broken references, refactored some stuff here and there,...
r10624 """ Returns the preferred display format """
Jonathan Frederic
Transformer refactor
r10436
def __call__(self, output):
""" Return the first available format in the priority """
for fmt in self.display_data_priority:
if fmt in output:
return [fmt]
Matthias BUSSONNIER
restore globalconfigurable
r10859 return []