core.scripts.migrate_imports#
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
Attributes#
Functions#
|
Replaces input strings with output strings in a given file. |
|
Module Contents#
- core.scripts.migrate_imports.mapping#
- core.scripts.migrate_imports.extensions = ['.yaml', '.py']#
- core.scripts.migrate_imports.replace_strings_in_file(file_path, replacements, dry_run)#
Replaces input strings with output strings in a given file.
- Parameters:
file_path (str) – Path to the file to process.
replacements (dict) – Dictionary of input strings to output strings.
dry_run (bool) – Whether to perform a dry run (print changes without making them).
- core.scripts.migrate_imports.main()#