MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / get_files_without_json_extension

Function get_files_without_json_extension

botasaurus/cache.py:109–119  ·  view source on GitHub ↗
(directory_path)

Source from the content-addressed store, hash-verified

107 Parallel(n_jobs=-1)(delayed(_remove)(file_path) for file_path in file_paths)
108
109def get_files_without_json_extension(directory_path):
110 # Get a list of all files in the directory
111 if not os.path.exists(directory_path):
112 return []
113
114 files = os.listdir(directory_path)
115
116 # Use rstrip to remove the .json extension from all filenames in the list
117 files_without_json_extension = [file.rstrip('.json') for file in files]
118
119 return files_without_json_extension
120
121def is_affirmative(input_string):
122 # List of affirmative representations

Callers 1

get_cached_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected