MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_dparse2_supported_file_name

Function get_dparse2_supported_file_name

src/packagedcode/pypi.py:2316–2330  ·  view source on GitHub ↗

Return the file_name if this is supported or None given a `file_name` string.

(file_name)

Source from the content-addressed store, hash-verified

2314
2315
2316def get_dparse2_supported_file_name(file_name):
2317 """
2318 Return the file_name if this is supported or None given a `file_name`
2319 string.
2320 """
2321 # this is kludgy but the upstream data structure and API needs this
2322 dfile_names = (
2323 'Pipfile.lock',
2324 'Pipfile',
2325 'conda.yml',
2326 )
2327
2328 for dfile_name in dfile_names:
2329 if file_name.endswith(dfile_name):
2330 return file_name
2331
2332
2333def parse_with_dparse2(location, file_name=None):

Callers 1

parseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected