aequitas / python-rflink

MIT License
30 stars 27 forks source link

Fix split for protocols with underscores #52

Closed javicalle closed 3 years ago

javicalle commented 3 years ago

Using the rsplit() function allows to leave as signal protocol all the expression from the second underscore, avoiding patching this code for each identified protocol.

On the other hand, format control that performed this function is lost, and probably useless:

assert len(id_switch) < 3

Disclaimer: I'm not fluent in Python and I don't have an IDE, so the changes have not been tested locally. My apologies. I have added two known test cases, thinking those comments are unit tests. Excuse me again if that change made is not correct.

javicalle commented 3 years ago

Check error seems no related with this PR.

If I'm not wrong complains about python-rflink/rflinkproxy/__main__.py.

aequitas commented 3 years ago

Thanks for looking into this. This change seems to solve the issue in #51. I made a new PR with fixes to the linting checks, as autopep8 and black seem to fight about a specific line unrelated to this PR #53

javicalle commented 3 years ago

I realise that is not a very active project and appreciate your job.

Thanks in advanced.

aequitas commented 3 years ago

Merged via #53

javicalle commented 3 years ago

Thanks