changeset 43484:da9ecbb10368

vfs: more attribute suppressions Differential Revision: https://phab.mercurial-scm.org/D7285
author Augie Fackler <augie@google.com>
date Wed, 06 Nov 2019 15:35:44 -0500
parents f2f460cdb4f5
children 6ff196d2553b
files mercurial/vfs.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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