Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
comes_from = [dep]
if any(name in dev_names for name in comes_from):
dev_reqs.append(req)
if any(name in req_names for name in comes_from):
reqs.append(req)
creation_dict = {
"path": pipfile.path.parent / 'Pipfile.lock',
"pipfile_hash": Hash(value=pipfile.get_hash()),
"sources": [s for s in pipfile.sources],
"dev_requirements": dev_reqs,
"requirements": reqs,
}
if pipfile.requires.has_value():
creation_dict['requires'] = pipfile.requires
lockfile = Lockfile(**creation_dict)
return lockfile