Skip to content

New types #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
658c451
Added exceptions for serialization and deserialization. These will co…
JeppeKlitgaard Apr 11, 2015
3e4c2dd
Abstraction in exceptions tests
JeppeKlitgaard Apr 11, 2015
a589c1e
Added exceptions for serialization and deserialization. These will co…
JeppeKlitgaard Apr 11, 2015
8ca5c7f
Abstraction in exceptions tests
JeppeKlitgaard Apr 11, 2015
5667cf9
Merge branch 'new_types' of github.com:ammaraskar/pyCraft into new_types
JeppeKlitgaard Apr 14, 2015
bac8769
Implemented some of the datatypes and some tests for them.
JeppeKlitgaard Apr 14, 2015
73b990c
Added DISALLOWED_SERIALIZATION_TYPES, making it easier to cherrypick …
JeppeKlitgaard Apr 14, 2015
a31f1c5
More datatype abstraction:
JeppeKlitgaard Apr 16, 2015
89a4368
Added tests for compat.py
JeppeKlitgaard Apr 16, 2015
af84a86
Merge branch 'master' into dev
JeppeKlitgaard Apr 16, 2015
83a2fdc
Merge branch 'dev' into new_types
JeppeKlitgaard Apr 16, 2015
5eddb67
Removed non-empty string deserialization test, as
JeppeKlitgaard Apr 16, 2015
4e6f223
Fixed 3 of the VALID_VALUES on the
JeppeKlitgaard Apr 16, 2015
ab4d78d
Started using six
JeppeKlitgaard Apr 16, 2015
474aa58
Merge remote-tracking branch 'origin/six' into new_types
JeppeKlitgaard Apr 16, 2015
cc184f3
Added tests for LongLong and UnsignedLongLong.
JeppeKlitgaard Apr 16, 2015
20e7c70
Implemented tests for the Float datatype.
JeppeKlitgaard Apr 16, 2015
026a410
Added tests for Double datatype
JeppeKlitgaard Apr 16, 2015
69d7e74
Removed useless commented code.
JeppeKlitgaard Apr 16, 2015
868bd14
PEP8
JeppeKlitgaard Apr 16, 2015
e1f8f02
Ignored python2-specific code on coverage report.
JeppeKlitgaard Apr 16, 2015
55ff270
Tests for VarInt
JeppeKlitgaard Apr 16, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions minecraft/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
both Python2 and Python3 while using the same codebase.
"""

# Raw input -> input shenangians
# example
# > from minecraft.compat import input
# > input("asd")
import six

# 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
# ### LONG ###
if six.PY3:
long = int
else: # pragma: no cover
long = long
16 changes: 15 additions & 1 deletion minecraft/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,19 @@

class YggdrasilError(Exception):
"""
Base `Exception` for the Yggdrasil authentication service.
Base ``Exception`` for the Yggdrasil authentication service.
"""


class DeserializationError(Exception):
"""
``Exception`` raised when something went wrong during the deserialization
process.
"""


class SerializationError(Exception):
"""
``Exception`` raised when something went wrong during the serialization
process.
"""
Loading