PluginProjectFlask.py

branch
eric7
changeset 84
f39230b845e4
parent 83
d8788dc3442f
child 85
fcb5126077b1
equal deleted inserted replaced
83:d8788dc3442f 84:f39230b845e4
57 else: 57 else:
58 apis = [] 58 apis = []
59 return apis 59 return apis
60 60
61 61
62 def createFlaskPage(configDlg): 62 def createFlaskPage(configDlg): # noqa: U100
63 """ 63 """
64 Module function to create the Flask configuration page. 64 Module function to create the Flask configuration page.
65 65
66 @param configDlg reference to the configuration dialog 66 @param configDlg reference to the configuration dialog
67 @type ConfigurationWidget 67 @type ConfigurationWidget
68 @return reference to the configuration page 68 @return reference to the configuration page
69 @rtype FlaskPage 69 @rtype FlaskPage
70 """ 70 """
71 from ProjectFlask.ConfigurationPage.FlaskPage import FlaskPage
72
71 global flaskPluginObject 73 global flaskPluginObject
72 from ProjectFlask.ConfigurationPage.FlaskPage import FlaskPage
73 74
74 page = FlaskPage(flaskPluginObject) 75 page = FlaskPage(flaskPluginObject)
75 return page 76 return page
76 77
77 78
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 "Flask",
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 "Flask",
210 SourcesBrowserFlag
211 | FormsBrowserFlag
212 | TranslationsBrowserFlag
213 | OthersBrowserFlag,
214 )
215 except ImportError:
216 Preferences.setProjectBrowsersDefault(
217 "Flask",
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
459 else: 443 else:
460 return [] 444 return []
461 445
462 446
463 # 447 #
464 # eflag: noqa = M801 448 # eflag: noqa = M801, U200

eric ide

mercurial