Return the file_name if this is supported or None given a `file_name` string.
(file_name)
| 2314 | |
| 2315 | |
| 2316 | def 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 | |
| 2333 | def parse_with_dparse2(location, file_name=None): |