Mercurial > hg
comparison mercurial/vfs.py @ 51679:be6d8ea6d3d2
typing: add a trivial type hint to `mercurial/vfs.py`
Since hg 3dbc7b1ecaba, pytype stopped seeing the return value of `rmtree` as
`None`, and substituted `Any`.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 10 Jul 2024 18:44:55 -0400 |
parents | ba205f944cb4 |
children | f4733654f144 |
comparison
equal
deleted
inserted
replaced
51678:0e16efe30866 | 51679:be6d8ea6d3d2 |
---|---|
289 """Remove an empty directory.""" | 289 """Remove an empty directory.""" |
290 return os.rmdir(self.join(path)) | 290 return os.rmdir(self.join(path)) |
291 | 291 |
292 def rmtree( | 292 def rmtree( |
293 self, path: Optional[bytes] = None, ignore_errors=False, forcibly=False | 293 self, path: Optional[bytes] = None, ignore_errors=False, forcibly=False |
294 ): | 294 ) -> None: |
295 """Remove a directory tree recursively | 295 """Remove a directory tree recursively |
296 | 296 |
297 If ``forcibly``, this tries to remove READ-ONLY files, too. | 297 If ``forcibly``, this tries to remove READ-ONLY files, too. |
298 """ | 298 """ |
299 if forcibly: | 299 if forcibly: |