summaryrefslogtreecommitdiff
path: root/games-util/sc-controller/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-11 23:39:55 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-11 23:39:55 +0100
commit7d040c2d1b0c38c8635ec28dfaa632a2db8be895 (patch)
tree78e9474cad949bcd1254749d61f4f6b9e7d488bf /games-util/sc-controller/files
parent0d39cf7bd8aae36b5d8eb4272a42dc6919216e34 (diff)
gentoo auto-resync : 11:04:2023 - 23:39:54
Diffstat (limited to 'games-util/sc-controller/files')
-rw-r--r--games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch b/games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch
new file mode 100644
index 000000000000..283dbba8be98
--- /dev/null
+++ b/games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch
@@ -0,0 +1,24 @@
+diff --git a/scc/lib/__init__.py b/scc/lib/__init__.py
+index 33d1486dd..0fe3141a5 100644
+--- a/scc/lib/__init__.py
++++ b/scc/lib/__init__.py
+@@ -1,3 +1,3 @@
+ #!/usr/bin/env python2
+
+-from enum import Enum, IntEnum, unique
++from .enum import Enum, IntEnum, unique
+diff --git a/tests/test_strings/test_keys.py b/tests/test_strings/test_keys.py
+new file mode 100644
+index 000000000..f118d373c
+--- /dev/null
++++ b/tests/test_strings/test_keys.py
+@@ -0,0 +1,8 @@
++from scc.uinput import Keys
++from scc.lib import IntEnum
++
++class TestKeys(object):
++ def test_up_str(self):
++ assert isinstance(Keys.KEY_UP, IntEnum)
++ assert Keys.KEY_UP.name == "KEY_UP"
++ assert str(Keys.KEY_UP) == "Keys.KEY_UP"
+\ No newline at end of file