devbisme / kinparse

A Parser for KiCad EESCHEMA netlists.
MIT License
23 stars 11 forks source link

Pin number type #3

Closed gnbl closed 6 years ago

gnbl commented 6 years ago

https://xesscorp.github.io/kinparse/docs/_build/singlehtml/index.html#usage says

nlst.nets[0].nodes[0].pin.val: Pin number of part for the first node on the net.

but the parser returns a str (https://github.com/xesscorp/kinparse/blob/master/kinparse/kinparse.py#L131). Not sure if a pin number could/should be a string. If it can't, part_pin = _paren_clause('pin', inum) would make sense but it seems pyparsing (http://pythonhosted.org/pyparsing/) returns str regardless, so the type conversion needs to be done by the user.

Please add a hint about the return type to the documentation.

xesscorp commented 6 years ago

Pin numbers can be strings. For example, BGA packages have pin numbers like "C11".

gnbl commented 6 years ago

Allright.