I executed the arcpy.management.CalculateFields() tool in ArcGIS Pro and copied/pasted the Python Command to a text editor. In some cases, it prefixes the "fields" parameter with "@" as in fields = @"X !XY!.split("","")[0] #;Y !XY!.split("","")[1] #".
I'm unable to find anything that explains what the "@" is doing for the string value. The only uses I've found for it is as a matrix operator and for accessing SHAPE properties.
It appears to be a "connector" to indicate that the following syntax is related to the SHAPE of the feature:
https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/reading-geometries.htm
Are the fields related to the geometry, by any chance? Like, the Shape, Shape_area, Shape_length, etc.? or are they descriptive attribute fields?
I used the CalculateFields() tool to set multiple fields, some of which were geometry-related. However, the "@" character appeared at the head of and outside the string.
If you can share an example project with the behavior in the history, I think we can log this as a bug.
Cheers, Shaun