I'm rewriting a Python 2.x script so that it can be used in Pro. I am struggling to figure out the syntax for refreshing a map series in Python. I found this page: MapSeries—ArcPy | ArcGIS Desktop, and I know there is a refresh() method, but I cannot figure out how to use it. I tried
lyt = aprx.listLayouts("AgLayout")
for lyr in m.listLayers("Parcel*"):
lyr.definitionQuery = "JOINPIN = '201-02-0-00-00-012.03-0'"
Line 6 throws an error that says "AttributeError: 'Layout' object has no attribute 'refresh'