looking-for-a-job/temp.py

View on GitHub
temp/__init__.py

Summary

Maintainability
A
0 mins
Test Coverage
__all__ = ["tempdir", "tempfile"]


import os
from tempfile import mkdtemp, mkstemp


def tempdir():
    """create temp dir and return path"""
    return mkdtemp()


def tempfile():
    """create temp file and return path"""
    f, path = mkstemp()
    os.close(f)
    return path