-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added NBT type #257
Added NBT type #257
Conversation
Hi, thanks for the contribution! Just make sure to add a changelog fragment file (see Btw, you can ignore the readthedocs check failing, it shouldn't be related to this PR. |
f079cf3
to
60bec83
Compare
The issue has been addressed, all the tests pass on all the platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I haven't yet checked the unit-test implementation at all, and this is more of a preliminary review, I haven't taken a deeper look at all of the logic and how things interract, but I wanted to submit it already since there's a fair few things I've noticed,
it's mostly minor fixes / standardization (surprised some of these weren't caught by the linter rules, I might need to take a look at that). But there are some more of a question based comments, where I'd like some feedback on how you meant for something to work, or on some code design choices.
PS: I know I'm a bit too pedantic, that's just how I am.
Note: this will need rebasing, as #131 introduced an additional pyright rule, which your current code is almost certainly in violation of, also pyright was (finally) updated in #264. Additionally #274 has dropped the use of That all very likely means that you will need to do some extra work to pass validation worfklow after rebase. |
638f6d5
to
afa61ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another quick one, just some more things I've noticed.
01b40e5
to
4427685
Compare
- Reading from Buffer object - Writing to Buffer object - Converting from/to python objects 100% test coverage for the nbt.py, Pyright and Ruff are happy
* Remove the TYPE class variable to rely in the actual type of each tag * Change the from_object and to_object to use schemas describing the data instead of using integer ranges and choosing types arbitrarily
Remove useless docstrings with @OverRide Fix formatting for Sphinx docstrings Return NotImplemented instead of raising the exception Make use of StructFormat to read/write the numeric types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There are still some minor details that could probably be changed, but I don't want to block this with insisting on those. That can always be done later. Generally, the implementation looks good to me. Thanks!
The NBT class has the following capabilities
100% test coverage for the nbt.py, Pyright and Ruff are happy