@@ -310,46 +310,54 @@ class PageSize(BaseSize):
310310
311311 __slots__ : List [str ] = []
312312
313- def __new__ (cls , width , height , unit = pt ):
313+ def __new__ (cls , width : AnyNumber , height : AnyNumber , unit : AnyNumber = pt ):
314+ """
315+ Create a new :class:`~domdf_python_tools.pagesizes.classes.PageSize` object.
316+
317+ :param width:
318+ :param height:
319+ :param unit:
320+ """
321+
314322 width , height = convert_from ((width , height ), unit )
315323 return super ().__new__ (cls , width , height )
316324
317325 @property
318326 def inch (self ) -> Size_inch :
319327 """
320- Returns the pagesize in inches
328+ Returns the pagesize in inches.
321329 """
322330
323331 return Size_inch .from_pt (self )
324332
325333 @property
326334 def cm (self ) -> Size_cm :
327335 """
328- Returns the pagesize in centimeters
336+ Returns the pagesize in centimeters.
329337 """
330338
331339 return Size_cm .from_pt (self )
332340
333341 @property
334342 def mm (self ) -> Size_mm :
335343 """
336- Returns the pagesize in millimeters
344+ Returns the pagesize in millimeters.
337345 """
338346
339347 return Size_mm .from_pt (self )
340348
341349 @property
342350 def um (self ) -> Size_um :
343351 """
344- Returns the pagesize in micrometers
352+ Returns the pagesize in micrometers.
345353 """
346354
347355 return Size_um .from_pt (self )
348356
349357 @property
350358 def pc (self ) -> Size_pica :
351359 """
352- Returns the pagesize in pica
360+ Returns the pagesize in pica.
353361 """
354362
355363 return Size_pica .from_pt (self )
@@ -359,7 +367,7 @@ def pc(self) -> Size_pica:
359367 @property
360368 def dd (self ) -> Size_didot :
361369 """
362- Returns the pagesize in didots
370+ Returns the pagesize in didots.
363371 """
364372
365373 return Size_didot .from_pt (self )
@@ -369,7 +377,7 @@ def dd(self) -> Size_didot:
369377 @property
370378 def cc (self ) -> Size_cicero :
371379 """
372- Returns the pagesize in ciceros
380+ Returns the pagesize in ciceros.
373381 """
374382
375383 return Size_cicero .from_pt (self )
@@ -379,7 +387,7 @@ def cc(self) -> Size_cicero:
379387 @property
380388 def nd (self ) -> Size_new_didot :
381389 """
382- Returns the pagesize in new didots
390+ Returns the pagesize in new didots.
383391 """
384392
385393 return Size_new_didot .from_pt (self )
@@ -389,7 +397,7 @@ def nd(self) -> Size_new_didot:
389397 @property
390398 def nc (self ) -> Size_new_cicero :
391399 """
392- Returns the pagesize in new ciceros
400+ Returns the pagesize in new ciceros.
393401 """
394402
395403 return Size_new_cicero .from_pt (self )
@@ -399,7 +407,7 @@ def nc(self) -> Size_new_cicero:
399407 @property
400408 def sp (self ) -> Size_scaled_point :
401409 """
402- Returns the pagesize in scaled point
410+ Returns the pagesize in scaled point.
403411 """
404412
405413 return Size_scaled_point .from_pt (self )
0 commit comments