646 for key in keys: |
647 for key in keys: |
647 if key.startswith("@@"): |
648 if key.startswith("@@"): |
648 # special treatment done later |
649 # special treatment done later |
649 continue |
650 continue |
650 cl = dictionary[key] |
651 cl = dictionary[key] |
651 try: |
652 with contextlib.suppress(AttributeError): |
652 if cl.module == moduleName: |
653 if cl.module == moduleName: |
653 node = BrowserClassItem(parentItem, cl, fileName) |
654 node = BrowserClassItem(parentItem, cl, fileName) |
654 self._addItem(node, parentItem) |
655 self._addItem(node, parentItem) |
655 except AttributeError: |
|
656 pass |
|
657 if "@@Coding@@" in keys and Preferences.getUI("BrowserShowCoding"): |
656 if "@@Coding@@" in keys and Preferences.getUI("BrowserShowCoding"): |
658 node = BrowserCodingItem( |
657 node = BrowserCodingItem( |
659 parentItem, |
658 parentItem, |
660 QCoreApplication.translate("BrowserModel", "Coding: {0}") |
659 QCoreApplication.translate("BrowserModel", "Coding: {0}") |
661 .format(dictionary["@@Coding@@"].coding), |
660 .format(dictionary["@@Coding@@"].coding), |