Changeset 4795


Ignore:
Timestamp:
Feb 3, 2021 10:54:16 AM (9 months ago)
Author:
toby
Message:

work on docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r4794 r4795  
    138138    import matplotlib as mpl
    139139except ImportError:
    140     pass
    141     # Emulate 'wx' so this file can be imported
    142     vals = ('TreeCtrl TextCtrl PyValidator Button ComboBox Choice CheckBox'.split() +
    143             'Dialog ID_ANY OPEN'.split())
     140    print('ImportError for wx/mpl in GSASIIctrlGUI: ignore if docs build')
     141    # wx = Placeholder(vals)
     142    # wxscroll = Placeholder(['ScrolledPanel'])
     143    # if 'phoenix' in wx.version():
     144    #     wg = Placeholder('Grid GridTableBase GridCellEditor'.split())
     145    # else:
     146    #     wg = Placeholder('Grid PyGridTableBase PyGridCellEditor'.split())
     147
     148
     149# avoid "duplicate base class _MockObject" error in class G2LstCtrl():
     150# where listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorterMixin are same
     151# in docs build
     152if listmix.ListCtrlAutoWidthMixin == listmix.ColumnSorterMixin:
     153    print('Dummy out listmix classes for docs build')
    144154    class Placeholder(object):
    145155        def __init__(self, vals):
     
    150160                return object
    151161            return Placeholder([])
    152     # wx = Placeholder(vals)
    153     # wxscroll = Placeholder(['ScrolledPanel'])
    154     # if 'phoenix' in wx.version():
    155     #     wg = Placeholder('Grid GridTableBase GridCellEditor'.split())
    156     # else:
    157     #     wg = Placeholder('Grid PyGridTableBase PyGridCellEditor'.split())
    158     # # avoid "duplicate base class _MockObject" error in class G2LstCtrl():
    159     # # where listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorterMixin are same
    160     # # in docs build
     162       
    161163    listmix = Placeholder()
    162164    listmix.ListCtrlAutoWidthMixin = Placeholder()
Note: See TracChangeset for help on using the changeset viewer.