Add Python 3.6 and 3.10 support, fixes #53
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import curses
|
||||
import sys
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
from squirrelbattle.display.texturepack import TexturePack
|
||||
@ -97,6 +98,8 @@ class Display:
|
||||
attr |= curses.A_BOLD if bold else 0
|
||||
attr |= curses.A_DIM if dim else 0
|
||||
attr |= curses.A_INVIS if invis else 0
|
||||
# Italic is supported since Python 3.7
|
||||
italic &= sys.version_info >= (3, 7,)
|
||||
attr |= curses.A_ITALIC if italic else 0
|
||||
attr |= curses.A_NORMAL if normal else 0
|
||||
attr |= curses.A_PROTECT if protect else 0
|
||||
|
Reference in New Issue
Block a user