I’m currently working on a script to help me optimize my viewport for better performance.
One way is changing the viewport aa. I have already found the line of code in which I can reference aa:
bpy.types isn’t meant for changing values, instead it stores the internal “types” of every property in Blender.
Instead, you should use bpy.data or bpy.context to access and modify properties. In your case, to change the current scene’s anti-aliasing, you should use:
bpy.context.scene.display.viewport_aa = "FXAA"
I would recommend watching some tutorials to get a feel for how the API works, these are pretty good: