mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-12-22 08:38:08 +01:00
commit
f2346740ad
@ -3,17 +3,4 @@ This module stores code used for making pyCraft compatible with
|
||||
both Python2 and Python3 while using the same codebase.
|
||||
"""
|
||||
|
||||
# Raw input -> input shenangians
|
||||
# example
|
||||
# > from minecraft.compat import input
|
||||
# > input("asd")
|
||||
|
||||
# Hi, I'm pylint, and sometimes I act silly, at which point my programmer
|
||||
# overlords need to correct me.
|
||||
|
||||
# pylint: disable=undefined-variable,redefined-builtin,invalid-name
|
||||
try:
|
||||
input = raw_input
|
||||
except NameError:
|
||||
input = input
|
||||
# pylint: enable=undefined-variable,redefined-builtin,invalid-name
|
||||
# Currently empty, this is sure to grow in time.
|
||||
|
@ -1,2 +1,3 @@
|
||||
cryptography
|
||||
requests
|
||||
six
|
||||
|
2
start.py
2
start.py
@ -6,7 +6,7 @@ from minecraft import authentication
|
||||
from minecraft.exceptions import YggdrasilError
|
||||
from minecraft.networking.connection import Connection
|
||||
from minecraft.networking.packets import ChatMessagePacket, ChatPacket
|
||||
from minecraft.compat import input
|
||||
from six.moves import input
|
||||
|
||||
|
||||
def get_options():
|
||||
|
@ -1,8 +1,5 @@
|
||||
from minecraft import compat # noqa unused-import
|
||||
|
||||
import unittest
|
||||
import unittest # noqa unused-import
|
||||
|
||||
|
||||
class TestCompatInput(unittest.TestCase):
|
||||
def test_import_input(self):
|
||||
from minecraft.compat import input # noqa unused-import
|
||||
# Currently empty, eventually it should grow.
|
||||
|
Loading…
Reference in New Issue
Block a user