olofk / ipyxact

Python-based IP-XACT parser
MIT License
121 stars 47 forks source link

a small buggette in the parser WRT boolean #34

Closed davidcuretonbaker closed 8 months ago

davidcuretonbaker commented 2 years ago

it appears that the first elif below should simply be an if. This blows on import using either python 2 or 3 class IpxactBool(str): def new(cls, *args, **kwargs): if not args: return None expr = args[0].strip(' \t\n\r') elif expr in ['true', 'false']: return super(IpxactBool, cls).new(cls, expr) else: raise Exception

I'm surprised this got passed even the most basic of testing. Makes me think I'm doing something wrong. Sorry if this is a red herring.

olofk commented 8 months ago

No, you're absolutely right. This was an error and I'm also not sure how it managed to slip through. It has been fixed since then, though. Thank you for the report