mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-25 11:46:54 +01:00
Merge remote-tracking branch 'origin/six' into new_types
This commit is contained in:
commit
474aa5858a
@ -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