@@ -208,7 +208,7 @@ def psnup(argv: list[str] = sys.argv[1:]) -> None:
208208 in_size = paper_size
209209 if size is None :
210210 die ("output page size not set, and could not get default paper size" )
211- assert ( in_size )
211+ assert in_size
212212
213213 # Take account of flip
214214 if args .flip :
@@ -281,9 +281,10 @@ def reduce_waste(
281281 )
282282
283283 # Page centring shifts
284- hshift , vshift = (ppwid / horiz - in_size .width * scale ) / 2 , (
285- pphgt / vert - in_size .height * scale
286- ) / 2
284+ hshift , vshift = (
285+ (ppwid / horiz - in_size .width * scale ) / 2 ,
286+ (pphgt / vert - in_size .height * scale ) / 2 ,
287+ )
287288
288289 # Construct specification list
289290 spec_list = []
@@ -303,13 +304,14 @@ def reduce_waste(
303304 xoff = args .margin + across * ppwid / horiz + hshift
304305 yoff = args .margin + up * pphgt / vert + vshift
305306 spec_list .append (
306- f' { page } { "L" if rotate else "" } @{ scale :f} ({ xoff :f} ,{ yoff :f} )'
307+ f" { page } { 'L' if rotate else '' } @{ scale :f} ({ xoff :f} ,{ yoff :f} )"
307308 )
308309
309310 # Rearrange pages
310311 specs , modulo , flipped = parsespecs (
311- f' { args .nup } :{ "+" .join (spec_list )} ' , paper_context
312+ f" { args .nup } :{ '+' .join (spec_list )} " , paper_context
312313 )
314+ sys .stderr .write (f"{ specs } { modulo } { flipped } " )
313315 transform = document_transform (
314316 doc , outfile , size , orig_in_size , specs , args .draw , in_size_guessed
315317 )
0 commit comments