PluginProjectPyramid.py

branch
eric7
changeset 168
fee59283137b
parent 167
d0f4aa941afe
child 169
0405f4f83719
equal deleted inserted replaced
167:d0f4aa941afe 168:fee59283137b
41 error = "" 41 error = ""
42 42
43 pyramidPluginObject = None 43 pyramidPluginObject = None
44 44
45 45
46 def createPyramidPage(configDlg): 46 def createPyramidPage(configDlg): # noqa: U100
47 """ 47 """
48 Module function to create the Pyramid configuration page. 48 Module function to create the Pyramid configuration page.
49 49
50 @param configDlg reference to the configuration dialog 50 @param configDlg reference to the configuration dialog
51 @type ConfigurationWidget 51 @type ConfigurationWidget
52 @return reference to the configuration page 52 @return reference to the configuration page
53 @rtype PyramidPage 53 @rtype PyramidPage
54 """ 54 """
55 from ProjectPyramid.ConfigurationPage.PyramidPage import PyramidPage
56
55 global pyramidPluginObject 57 global pyramidPluginObject
56 from ProjectPyramid.ConfigurationPage.PyramidPage import PyramidPage
57 58
58 return PyramidPage(pyramidPluginObject) 59 return PyramidPage(pyramidPluginObject)
59 60
60 61
61 def getConfigData(): 62 def getConfigData():
194 lexerAssociationCallback=self.lexerAssociationCallback, 195 lexerAssociationCallback=self.lexerAssociationCallback,
195 binaryTranslationsCallback=self.binaryTranslationsCallback, 196 binaryTranslationsCallback=self.binaryTranslationsCallback,
196 progLanguages=self.__supportedVariants[:], 197 progLanguages=self.__supportedVariants[:],
197 ) 198 )
198 199
199 try: 200 Preferences.setProjectBrowsersDefault(
200 # backward compatibility for eric7 < 22.12 201 "Pyramid",
201 from eric7.Project.ProjectBrowser import ( 202 ("sources", "forms", "translations", "others"),
202 FormsBrowserFlag, 203 )
203 OthersBrowserFlag,
204 SourcesBrowserFlag,
205 TranslationsBrowserFlag,
206 )
207
208 Preferences.setProjectBrowserFlagsDefault(
209 "Pyramid",
210 SourcesBrowserFlag
211 | FormsBrowserFlag
212 | TranslationsBrowserFlag
213 | OthersBrowserFlag,
214 )
215 except ImportError:
216 Preferences.setProjectBrowsersDefault(
217 "Pyramid",
218 ("sources", "forms", "translations", "others"),
219 )
220 204
221 if self.__ericProject.isOpen(): 205 if self.__ericProject.isOpen():
222 self.__projectOpened() 206 self.__projectOpened()
223 self.__object.projectOpenedHooks() 207 self.__object.projectOpenedHooks()
224 208
473 """ 457 """
474 try: 458 try:
475 import cookiecutter # __IGNORE_WARNING__ 459 import cookiecutter # __IGNORE_WARNING__
476 except ImportError: 460 except ImportError:
477 pipInstall(["cookiecutter"]) 461 pipInstall(["cookiecutter"])
462
463
464 #
465 # eflag: noqa = U200

eric ide

mercurial