Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Aug 24, 2021
1 parent 7192030 commit 412b589
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion weasyprint/css/validation/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,8 @@ def text_align(keyword):
@single_keyword
def text_align_last(keyword):
"""``text-align-last`` property validation."""
return keyword in ('auto', 'left', 'right', 'center', 'justify', 'start', 'end')
return keyword in (
'auto', 'left', 'right', 'center', 'justify', 'start', 'end')


@property()
Expand Down
10 changes: 5 additions & 5 deletions weasyprint/layout/inlines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,12 +1316,12 @@ def text_align(context, line, available_width, last):
return 0

align = line.style['text_align']
align_last = line.style['text_align_last']
if last:
if align_last != 'auto':
align = align_last
elif align == 'justify':
align = 'start'
align_last = line.style['text_align_last']
if align_last != 'auto':
align = align_last
elif align == 'justify':
align = 'start'
space_collapse = line.style['white_space'] in (
'normal', 'nowrap', 'pre-line')
if align in ('left', 'right'):
Expand Down

0 comments on commit 412b589

Please sign in to comment.