diff --git a/minecraft/authentication.py b/minecraft/authentication.py index 04b4a34..7528f58 100644 --- a/minecraft/authentication.py +++ b/minecraft/authentication.py @@ -18,7 +18,7 @@ class Profile(object): See: ``_ """ def __init__(self, id_=None, name=None): - self.id = id_ + self.id_ = id_ self.name = name def to_dict(self): @@ -26,13 +26,13 @@ class Profile(object): Returns ``self`` in dictionary-form, which can be serialized by json. """ if self: - return {"id": self.id, + return {"id": self.id_, "name": self.name} else: raise AttributeError("Profile is not yet populated.") def __bool__(self): - bool_state = self.id is not None and self.name is not None + bool_state = self.id_ is not None and self.name is not None return bool_state # Python 2 support @@ -121,7 +121,7 @@ class AuthenticationToken(object): self.username = username self.access_token = json_resp["accessToken"] self.client_token = json_resp["clientToken"] - self.profile.id = json_resp["selectedProfile"]["id"] + self.profile.id_ = json_resp["selectedProfile"]["id"] self.profile.name = json_resp["selectedProfile"]["name"] return True diff --git a/minecraft/compat.py b/minecraft/compat.py index 564f59e..865d71c 100644 --- a/minecraft/compat.py +++ b/minecraft/compat.py @@ -11,9 +11,9 @@ both Python2 and Python3 while using the same codebase. # Hi, I'm pylint, and sometimes I act silly, at which point my programmer # overlords need to correct me. -# pylint: disable=undefined-variable +# pylint: disable=undefined-variable,redefined-builtin,invalid-name try: input = raw_input except NameError: pass -# pylint: enable=undefined-variable +# pylint: enable=undefined-variable,redefined-builtin,invalid-name diff --git a/minecraft/networking/__init__.py b/minecraft/networking/__init__.py index e69de29..672e47f 100644 --- a/minecraft/networking/__init__.py +++ b/minecraft/networking/__init__.py @@ -0,0 +1,3 @@ +""" +Contains the networking code for `pyminecraft`. +"""