Kane610 / aiounifi

Asynchronous library to communicate with Unifi Controller
MIT License
57 stars 49 forks source link

Add some more typing to Traffic Routes and save #537

Closed ViViDboarder closed 7 months ago

ViViDboarder commented 7 months ago

Adds some more types and makes the saving function more explicit.

Rebased from #529

Kane610 commented 7 months ago

Awesome! Only two things left

ViViDboarder commented 7 months ago

What do you think about me moving some of the shared TypedDicts out to a common module? IPAddress and a few others are used in traffic_rule and traffic_route.

Kane610 commented 7 months ago

What do you think about me moving some of the shared TypedDicts out to a common module? IPAddress and a few others are used in traffic_rule and traffic_route.

It's fine to keep separate for now. I'm considering creating types as a parallell folder to interface and models but can't make up my mind 🙃

ViViDboarder commented 7 months ago

Should be up to 100% now.

ViViDboarder commented 7 months ago

So, this diff ends up changing more. I realized the other test was modifying the fixtures values which munged with other tests. So I made a change to make sure it's a deep copy. That broke other tests so I added some more asserts and made them more robust.