A Python toolbox (.pyt) is an ASCII file that can be edited in any text editor or Python IDE.
To edit a Python toolbox, right-click the toolbox and click Edit. When your edits are finished, your Python toolbox will be automatically refreshed when the editor is closed. Alternatively, to manually refresh a Python toolbox at any time, right-click the toolbox and click Refresh.
By default, the Python toolbox will open in NotePad. To control the application in which the .pyt file is opened, click the Project tab, click Options, click Geoprocessing, and edit Script Editor.