Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/utils.py
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | '636465': b""" | ||||
"request": "^2.87.0", | "request": "^2.87.0", | ||||
"test": "^0.6.0" | "test": "^0.6.0" | ||||
} | } | ||||
} | } | ||||
""" | """ | ||||
} | } | ||||
YARN_PARSER_METADATA = { | |||||
'@context': 'https://doi.org/10.5063/schema/codemeta-2.0', | |||||
'url': | |||||
'https://github.com/librariesio/yarn-parser#readme', | |||||
'codeRepository': | |||||
'git+git+https://github.com/librariesio/yarn-parser.git', | |||||
'author': [{ | |||||
'type': 'Person', | |||||
'name': 'Andrew Nesbitt' | |||||
}], | |||||
'license': 'https://spdx.org/licenses/AGPL-3.0', | |||||
'version': '1.0.0', | |||||
'description': | |||||
'Tiny web service for parsing yarn.lock files', | |||||
'issueTracker': | |||||
'https://github.com/librariesio/yarn-parser/issues', | |||||
'name': 'yarn-parser', | |||||
'keywords': ['yarn', 'parse', 'lock', 'dependencies'], | |||||
} | |||||
def filter_dict(d, keys): | def filter_dict(d, keys): | ||||
'return a copy of the dict with keys deleted' | 'return a copy of the dict with keys deleted' | ||||
if not isinstance(keys, (list, tuple)): | if not isinstance(keys, (list, tuple)): | ||||
keys = (keys, ) | keys = (keys, ) | ||||
return dict((k, v) for (k, v) in d.items() if k not in keys) | return dict((k, v) for (k, v) in d.items() if k not in keys) | ||||
def fill_obj_storage(obj_storage): | def fill_obj_storage(obj_storage): | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |