Patchwork D10183: typing: disable a module-attr warning in the worker module's py2 code

login
register
mail settings
Submitter phabricator
Date March 12, 2021, 6:09 p.m.
Message ID <differential-rev-PHID-DREV-ychux5ocvnuq3pzujnti-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48496/
State Superseded
Headers show

Comments

phabricator - March 12, 2021, 6:09 p.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  mercurial/worker.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/worker.py b/mercurial/worker.py
--- a/mercurial/worker.py
+++ b/mercurial/worker.py
@@ -104,7 +104,9 @@ 
 else:
 
     def ismainthread():
+        # pytype: disable=module-attr
         return isinstance(threading.current_thread(), threading._MainThread)
+        # pytype: enable=module-attr
 
     def _blockingreader(wrapped):
         return wrapped