File tree 1 file changed +4
-12
lines changed
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -441,9 +441,7 @@ def grid_span(self) -> int:
441
441
Determined by ./w:tcPr/w:gridSpan/@val, it defaults to 1.
442
442
"""
443
443
tcPr = self .tcPr
444
- if tcPr is None :
445
- return 1
446
- return tcPr .grid_span
444
+ return 1 if tcPr is None else tcPr .grid_span
447
445
448
446
@grid_span .setter
449
447
def grid_span (self , value : int ):
@@ -809,9 +807,7 @@ def grid_span(self) -> int:
809
807
Determined by ./w:gridSpan/@val, it defaults to 1.
810
808
"""
811
809
gridSpan = self .gridSpan
812
- if gridSpan is None :
813
- return 1
814
- return gridSpan .val
810
+ return 1 if gridSpan is None else gridSpan .val
815
811
816
812
@grid_span .setter
817
813
def grid_span (self , value : int ):
@@ -898,9 +894,7 @@ class CT_TrPr(BaseOxmlElement):
898
894
def trHeight_hRule (self ) -> WD_ROW_HEIGHT_RULE | None :
899
895
"""Return the value of `w:trHeight@w:hRule`, or |None| if not present."""
900
896
trHeight = self .trHeight
901
- if trHeight is None :
902
- return None
903
- return trHeight .hRule
897
+ return None if trHeight is None else trHeight .hRule
904
898
905
899
@trHeight_hRule .setter
906
900
def trHeight_hRule (self , value : WD_ROW_HEIGHT_RULE | None ):
@@ -913,9 +907,7 @@ def trHeight_hRule(self, value: WD_ROW_HEIGHT_RULE | None):
913
907
def trHeight_val (self ):
914
908
"""Return the value of `w:trHeight@w:val`, or |None| if not present."""
915
909
trHeight = self .trHeight
916
- if trHeight is None :
917
- return None
918
- return trHeight .val
910
+ return None if trHeight is None else trHeight .val
919
911
920
912
@trHeight_val .setter
921
913
def trHeight_val (self , value : Length | None ):
You can’t perform that action at this time.
0 commit comments