vfs: more attribute suppressions
authorAugie Fackler <augie@google.com>
Wed, 06 Nov 2019 15:35:44 -0500
changeset 43532 da9ecbb10368
parent 43531 f2f460cdb4f5
child 43533 6ff196d2553b
vfs: more attribute suppressions Differential Revision: https://phab.mercurial-scm.org/D7285
mercurial/vfs.py
--- a/mercurial/vfs.py	Wed Nov 06 15:35:21 2019 -0500
+++ b/mercurial/vfs.py	Wed Nov 06 15:35:44 2019 -0500
@@ -487,7 +487,9 @@
             threading.currentThread(),
             threading._MainThread,  # pytype: disable=module-attr
         ):
-            if not self._backgroundfilecloser:
+            if (
+                not self._backgroundfilecloser  # pytype: disable=attribute-error
+            ):
                 raise error.Abort(
                     _(
                         b'backgroundclose can only be used when a '
@@ -495,7 +497,10 @@
                     )
                 )
 
-            fp = delayclosedfile(fp, self._backgroundfilecloser)
+            fp = delayclosedfile(
+                fp,
+                self._backgroundfilecloser,  # pytype: disable=attribute-error
+            )
 
         return fp