Fix global and documentation issues highlighted by gpshead and pipelines
This commit is contained in:
parent
14f00ec4e4
commit
809efe327c
|
@ -84,7 +84,6 @@ def _exists(fn):
|
|||
|
||||
def _infer_return_type(*args):
|
||||
"""Look at the type of all args and divine their implied return type."""
|
||||
global tempdir
|
||||
return_type = None
|
||||
for arg in args:
|
||||
if arg is None:
|
||||
|
@ -295,11 +294,11 @@ def _gettempdir():
|
|||
return tempdir
|
||||
|
||||
def gettempdir():
|
||||
"""A string version of tempfile._gettempdir()."""
|
||||
"""Returns tempfile.tempdir as str."""
|
||||
return _os.fsdecode(_gettempdir())
|
||||
|
||||
def gettempdirb():
|
||||
"""A bytes version of tempfile._gettempdir()."""
|
||||
"""Returns tempfile.tempdir as bytes."""
|
||||
return _os.fsencode(_gettempdir())
|
||||
|
||||
def mkstemp(suffix=None, prefix=None, dir=None, text=False):
|
||||
|
|
|
@ -1 +1 @@
|
|||
Make sure that having the :term:`tempfile.tempdir` variable set as bytes is handled consistently and that the getter functions return the right type, str or bytes.
|
||||
Make sure that having the :data:`tempfile.tempdir` variable set as bytes is handled consistently and that the getter functions return the right type, str or bytes.
|
||||
|
|
Loading…
Reference in New Issue