Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1.75 KB

File metadata and controls

46 lines (27 loc) · 1.75 KB

Variable Name Consistency

This script is designed to make variable names consistent in a Python file. It applies a consistent naming convention to all variable names found in the file.

Usage

  1. Make sure you have Python installed on your system.

  2. Clone this repository or download the make_variable_names_consistent.py file.

  3. Open a terminal or command prompt and navigate to the directory where the make_variable_names_consistent.py file is located.

  4. Run the script by executing the following command:

    python make_variable_names_consistent.py
  5. The script will prompt you to enter the path to the Python file you want to modify. Provide the full path to the file and press Enter.

  6. The script will apply a consistent naming convention to the variable names in the specified Python file.

    • The default naming convention converts variable names to lowercase. You can modify the convert_to_consistent_name function in the script to implement your preferred convention.

    • The modified content will be written back to the original file.

  7. Please make sure to create a backup of your file before running this script, as it will modify the file in place.

Examples

Here's an example of how the script can be used:

python make_variable_names_consistent.py
Enter the path to the Python file: /path/to/your/python/file.py

This will apply the consistent naming convention to the variable names in file.py.

License

This project is licensed under the MIT License.

Feel free to use, modify, and distribute this code as per the terms of the license.

Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. Contributions are welcome!