mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-09 03:01:25 +08:00
Add more complete type hints for pkg_resources. (#2433)
The current file only covers pkg_resources/__init__.py. pkg_resources/py31compat.pyi is used by setuptools, for example.
This commit is contained in:
committed by
Sebastian Rittau
parent
47f22a341e
commit
b40cae139f
14
third_party/3/pkg_resources/py31compat.pyi
vendored
Normal file
14
third_party/3/pkg_resources/py31compat.pyi
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import Text
|
||||
import os
|
||||
import sys
|
||||
|
||||
needs_makedirs: bool
|
||||
|
||||
def _makedirs_31(path: Text, exist_ok: bool = ...) -> None: ...
|
||||
|
||||
# _makedirs_31 has special behavior to handle an edge case that was removed in
|
||||
# 3.4.1. No one should be using 3.4 instead of 3.4.1, so this should be fine.
|
||||
if sys.version_info >= (3,):
|
||||
makedirs = os.makedirs
|
||||
else:
|
||||
makedirs = _makedirs_31
|
||||
Reference in New Issue
Block a user