Since doc is str, it seems natural that _origdoc also is.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
Since doc is str, it seems natural that _origdoc also is.
Lint Skipped |
Unit Tests Skipped |
hgext/show.py | ||
---|---|---|
463 | Hmm, I guess I should have just used r'' here. I'll update that. |
Path | Packages | |||
---|---|---|---|---|
M | hgext/show.py (4 lines) | |||
M | mercurial/registrar.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
4471b1013cb5 | 44e99811bea7 | Martin von Zweigbergk | Jul 9 2019, 3:03 AM |
def _doregister(self, func, decl, *args, **kwargs): | def _doregister(self, func, decl, *args, **kwargs): | ||||
name = self._getname(decl) | name = self._getname(decl) | ||||
if name in self._table: | if name in self._table: | ||||
msg = 'duplicate registration for name: "%s"' % name | msg = 'duplicate registration for name: "%s"' % name | ||||
raise error.ProgrammingError(msg) | raise error.ProgrammingError(msg) | ||||
if func.__doc__ and not util.safehasattr(func, '_origdoc'): | if func.__doc__ and not util.safehasattr(func, '_origdoc'): | ||||
doc = pycompat.sysbytes(func.__doc__).strip() | func._origdoc = func.__doc__.strip() | ||||
func._origdoc = doc | doc = pycompat.sysbytes(func._origdoc) | ||||
func.__doc__ = pycompat.sysstr(self._formatdoc(decl, doc)) | func.__doc__ = pycompat.sysstr(self._formatdoc(decl, doc)) | ||||
self._table[name] = func | self._table[name] = func | ||||
self._extrasetup(name, func, *args, **kwargs) | self._extrasetup(name, func, *args, **kwargs) | ||||
return func | return func | ||||
def _merge(self, registrarbase): | def _merge(self, registrarbase): |
Hmm, I guess I should have just used r'' here. I'll update that.