diff --git a/xlsxwriter/worksheet.py b/xlsxwriter/worksheet.py index 31453c77b..d23185df0 100644 --- a/xlsxwriter/worksheet.py +++ b/xlsxwriter/worksheet.py @@ -2986,13 +2986,13 @@ def conditional_format( elif options["criteria"] == "tomorrow": options["formula"] = "FLOOR(%s,1)=TODAY()+1" % start_cell + # fmt: off elif options["criteria"] == "last7Days": - options[ - "formula" - ] = "AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())" % ( - start_cell, - start_cell, + options["formula"] = ( + "AND(TODAY()-FLOOR(%s,1)<=6,FLOOR(%s,1)<=TODAY())" + % (start_cell, start_cell) ) + # fmt: on elif options["criteria"] == "lastWeek": options["formula"] = ( @@ -3023,11 +3023,12 @@ def conditional_format( ) elif options["criteria"] == "thisMonth": - options[ - "formula" - ] = "AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))" % ( - start_cell, - start_cell, + options["formula"] = ( + "AND(MONTH(%s)=MONTH(TODAY()),YEAR(%s)=YEAR(TODAY()))" + % ( + start_cell, + start_cell, + ) ) elif options["criteria"] == "nextMonth":