vaphes / pocketbase

PocketBase client SDK for python
https://pypi.org/project/pocketbase/
MIT License
359 stars 41 forks source link

Refactor/Simplify Code #62

Closed Jerry-py closed 1 year ago

Jerry-py commented 1 year ago

Overview

The pull request is just code refactors. I also didn't test the code which I don't know if it will work but I'm sure you can review if there is any significant changes

Note: What's the difference between writing {} then just None

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5470490412


Changes Missing Coverage Covered Lines Changed/Added Lines %
pocketbase/services/record_service.py 11 12 91.67%
<!-- Total: 25 26 96.15% -->
Totals Coverage Status
Change from base Build 5290254865: 0.1%
Covered Lines: 784
Relevant Lines: 825

💛 - Coveralls
m29h commented 1 year ago

For python 3.8 and earlier the added syntactic sugar seems unsupported as shown by the integration tests. TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'

In principle the changes look good to me but at least Python 3.8 according to PEP 569 is not in end of life until October 2024. Not sure what our policy here should be? maybe @vaphes has an opinion?

Jerry-py commented 1 year ago

We can leave this PR until py version 3.8 is no longer in use. It's up to you if you want to wait or close the pr