typing: add basic type hints to vfs.py...
typing: add basic type hints to vfs.py
Again, there's a lot more that could be done, but this sticks to the obviously
correct stuff that is related to primitives or `vfs` objects. Hopefully this
helps smoke out more path related bytes vs str issues in TortoiseHg.
PyCharm seems smart enough to apply hints from annotated superclass functions,
but pytype isn't (according to the *.pyi file generated), so those are annotated
too.
There was some discussion about changing the default path arg from `None` to
`b''` in order to avoid the more verbose `Optional` declarations. This would be
more in line with `os.path.join()` (which rejects `None`, but ignores empty
strings), and still not change the behavior for callers still passing `None`
(because the check is `if path` instead of an explicit check for `None`). But I
didn't want to hold this up while discussing that, so this documents what _is_.