AlexandrErohin / TP-Link-Archer-C6U

Python package for API access and management for TP-Link Routers. See supported routers list
GNU General Public License v3.0
59 stars 22 forks source link

authorize() return value #18

Closed quinnaissance closed 8 months ago

quinnaissance commented 8 months ago

Hello, this is great work, I've been looking for something like this for a while and I'm really glad I found this.

I just have a quick question. I was initially using the example code in the README and it was not working. I eventually discovered that was because the authorize() function was returning None, which I then learned Python interprets as False, so the entire if branch was not being traversed at all. I looked at the declaration for authorize() and surely enough type hint is None, and I didn't see a return anywhere inside the function. I eventually managed to get it working on my AX55 by removing the if.

I just wanted to know if this was intentional? My experience with Python is not very advanced so I'm not sure if I'm just missing something.

AlexandrErohin commented 8 months ago

Hi Yes it is a mistake in documentation as previously authorize() returns bool. I have updated the documentation

quinnaissance commented 8 months ago

Cheers, thanks for the follow-up. Will close this now.