D7008: py3: stop injecting pycompat.hasattr into modules

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sun Oct 6 23:25:06 EDT 2019


martinvonz added inline comments.

INLINE COMMENTS

> statprof.py:171
>              self.sample_interval = 1.0 / frequency
> -        elif not hasattr(self, 'sample_interval'):
> +        elif not pycompat.hasattr(self, 'sample_interval'):
>              # default to 1000 Hz

Should we switch to `util.safehasattr()` for consistency?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7008/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7008

To: indygreg, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list