PyCharm interprets a certain py file as a text file without code hints and cannot be executed.
Restarting, reinstalling, or deleting the IDE configuration is not good (maybe the IDE configuration was not deleted), but later found that it was a problem with the File Types setting.
Solution:
- Windows:【File】->【Settings】->【Editor】->【File Types】->选择【Text】
- Mac:【Pycharm】->【Preferences】->【Editor】->【File Types】->选择【Text】
Find the grayed-out file name suffix in [Registered Patterns], click Delete and save it.