def add_cache(opts: Namespace) -> None: """ Tack on a localized copy of ShExCache for safety :param opts: parser arguments """ if opts.cachedir: os.makedirs(opts.cachedir, exist_ok=True) opts.shex_cache = ShExCache(opts.shexdir, opts.cachedir)