This allows mypy to actually type-check calls to db methods.
This commit also fixes an issue found by mypy.
Thanks to @anlambert noticing this issue in D5934
Differential D5937
postgresql: Add type annotation for 'db' argument vlorentz on Jun 28 2021, 5:28 PM. Authored by
Details
This allows mypy to actually type-check calls to db methods. This commit also fixes an issue found by mypy. Thanks to @anlambert noticing this issue in D5934
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D5937 (id=21316)Could not rebase; Attempt merge onto ec2fac4478... Updating ec2fac44..f1cac4fc Fast-forward swh/storage/cassandra/cql.py | 12 +++ swh/storage/cassandra/storage.py | 12 +++ swh/storage/in_memory.py | 6 ++ swh/storage/interface.py | 7 ++ swh/storage/postgresql/db.py | 16 +++- swh/storage/postgresql/storage.py | 162 ++++++++++++++++++++++--------------- swh/storage/tests/storage_tests.py | 49 +++++++++++ 7 files changed, 199 insertions(+), 65 deletions(-) Changes applied before testcommit f1cac4fcaa153f2cba5af2eaa4e5c0aa14868f49 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Mon Jun 28 17:28:15 2021 +0200 postgresql: Add type annotation for 'db' argument This allows mypy to actually type-check calls to db methods. This commit also fixes an issue found by mypy. commit dd8a590b629dc322ef42c111ab710dce06f2542e Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Mon Jun 28 17:21:18 2021 +0200 --amend commit c5beb49a73cd0004459ceea736efe3d989037420 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Mon Jun 28 15:30:41 2021 +0200 Add endpoint raw_extrinsic_metadata_get_authorities This will make it easier for users of swh-web to discover metadata on a given SWHID, as you otherwise need to specify an authority to fetch metadata. See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1348/ for more details. |