dominicprice / endplay

A suite of tools for generation and analysis of bridge deals. Read the documentation at https://endplay.readthedocs.io
MIT License
21 stars 5 forks source link

LIN/PBN import/export #53

Closed ThorvaldAagaard closed 3 weeks ago

ThorvaldAagaard commented 3 weeks ago

During import/export of lin/pbn files I found some issues.

1: In some PBN-files missing attributes are written as

[Declarer "?"]
[Contract "?"]
[Result "?"]

So I have added default for these

2: When importing .lin files endplay assumes all deals are one-liners I have changed the way a lin-file is read, so tag |pn| is used (parse_file and parse_string), as oneliners are not given Perhaps it should be 2 new methods, and be aware that there might be .lin files, where |mb| is the delimiter

3: I have added a lot of tags used in a .lin file, that can be ignored

4: I have updated the alert for bids in a .lin file so it is saving a comment as the explanation if alert is ?

After making the commit my repository failed the lint check and format, but I haven't been able to solve it

Running:

isort --tc --profile black --check-only .

gives no errors

and the error from poetry is where I have made no changes

I hope you can figure out how to handle it

dominicprice commented 3 weeks ago

hi, thanks for doing this :) i think i have fixed the formatting problems