midstar / pycstruct

A python library for reading and writing binary data similar to what is done in C language structs
MIT License
23 stars 4 forks source link

Update type hint in add method of StructDef #37

Open pmbarrett314 opened 2 years ago

pmbarrett314 commented 2 years ago

Since StructDef.add can accept instances of other subclasses of _BaseDef for the datatype, this type hint doesn't cover all possible cases, which annoys my IDE and type checker.

midstar commented 2 years ago

Hi! Change looks fine for me but please run black (https://pypi.org/project/black/) on your updated files and update your branch with the result. Our CI fails unless all files has been "blacked"

pmbarrett314 commented 2 years ago

I ran black and committed that. Looks like CI is finding some pylint issues now. I don't think either of these are in my change, though, it is just a single line change in a doc comment.

midstar commented 2 years ago

Sorry for the late response. I'm on vacation and don't have access to a computer. I will check it when I'm back.

pmbarrett314 commented 2 years ago

No worries, it's not exactly an urgent bug. Have a good vacation!

midstar commented 2 years ago

Author

The issues on this pull request is due to changed rules in black and pylint. I have fixed this on master branch. Please perform a new pull request against the new master and it will probably be fine :-)