I think this'll work better:
```
cursor.execute("select drop_named_partitions('%s'::date)", (cut_off_date,))
```
then you let `.execute` worry about inserting the arguments. There's no chance of a SQL injection here but it's still good practice to let the driver handle the conversion of objects to SQL.