Details
Details
- Reviewers
dlax indygreg - Group Reviewers
hg-reviewers - Commits
- rHG1ea33dff7841: extensions: hide two confusing import statements from pytype
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
dlax | |
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
In D7408#109174, @dlax wrote:Out of curiosity, where does this __index__ value come from?
Beats me.
In D7408#109565, @indygreg wrote:Where does hgext.__index__ come from?!
This is generated by setup.py, apparently only when building with py2exe.
Path | Packages | |||
---|---|---|---|---|
M | mercurial/extensions.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
0aa67519a01f | a2f5e084aefd | Augie Fackler | Nov 14 2019, 3:49 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Abandoned | durin42 | ||
Abandoned | durin42 | ||
Changes Planned | mharbison72 | ||
Needs Revision | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Needs Revision | durin42 | ||
Changes Planned | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 |
return gettext(doc) | return gettext(doc) | ||||
else: | else: | ||||
return _(b'(no help text available)') | return _(b'(no help text available)') | ||||
def disabled(): | def disabled(): | ||||
'''find disabled extensions from hgext. returns a dict of {name: desc}''' | '''find disabled extensions from hgext. returns a dict of {name: desc}''' | ||||
try: | try: | ||||
from hgext import __index__ | from hgext import __index__ # pytype: disable=import-error | ||||
return dict( | return dict( | ||||
(name, gettext(desc)) | (name, gettext(desc)) | ||||
for name, desc in pycompat.iteritems(__index__.docs) | for name, desc in pycompat.iteritems(__index__.docs) | ||||
if name not in _order | if name not in _order | ||||
) | ) | ||||
except (ImportError, AttributeError): | except (ImportError, AttributeError): | ||||
pass | pass | ||||
exts[name] = doc.splitlines()[0] | exts[name] = doc.splitlines()[0] | ||||
return exts | return exts | ||||
def disabledext(name): | def disabledext(name): | ||||
'''find a specific disabled extension from hgext. returns desc''' | '''find a specific disabled extension from hgext. returns desc''' | ||||
try: | try: | ||||
from hgext import __index__ | from hgext import __index__ # pytype: disable=import-error | ||||
if name in _order: # enabled | if name in _order: # enabled | ||||
return | return | ||||
else: | else: | ||||
return gettext(__index__.docs.get(name)) | return gettext(__index__.docs.get(name)) | ||||
except (ImportError, AttributeError): | except (ImportError, AttributeError): | ||||
pass | pass | ||||