client: make API response typify-ing optional
3 unresolved threads
Closed
requested to merge generated-differential-D4160-source into generated-differential-D4160-target
3 unresolved threads
Merge request reports
Activity
Filter activity
Build is green
Patch application report for D4160 (id=14663)
Rebasing onto 677e9856...
Current branch diff-target is up to date.
Changes applied before test
commit d9e55d0e75af0bf9bd90a98986a2eb6669e58078 Author: Thibault Allançon <haltode@gmail.com> Date: Tue Oct 6 14:28:03 2020 +0200 client: make API response typify-ing optional Closes #2646.
See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/21/ for more details.
236 yield from self.directory(swhid_, typify) 235 237 elif obj_type == CONTENT: 236 yield from [self.content(swhid_)] 238 yield from [self.content(swhid_, typify)] 237 239 else: 238 240 raise ValueError(f"invalid object type: {obj_type}") 239 241 240 def content(self, swhid: SWHIDish, **req_args) -> Dict[str, Any]: 242 def content( 243 self, swhid: SWHIDish, typify: bool = True, **req_args 244 ) -> Dict[str, Any]: 241 245 """Retrieve information about a content object 242 246 243 247 Args: 244 248 swhid: object persistent identifier 249 typify: if True, convert return value to pythonic types wherever Build is green
Patch application report for D4160 (id=14665)
Rebasing onto 677e9856...
Current branch diff-target is up to date.
Changes applied before test
commit bb23b299617e5c3d337032b21da3151ecb744a33 Author: Thibault Allançon <haltode@gmail.com> Date: Tue Oct 6 14:28:03 2020 +0200 client: make API response typify-ing optional Closes #2646.
See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/22/ for more details.
235 237 elif obj_type == CONTENT: 236 yield from [self.content(swhid_)] 238 yield from [self.content(swhid_, typify)] 237 239 else: 238 240 raise ValueError(f"invalid object type: {obj_type}") 239 241 240 def content(self, swhid: SWHIDish, **req_args) -> Dict[str, Any]: 242 def content( 243 self, swhid: SWHIDish, typify: bool = True, **req_args 244 ) -> Dict[str, Any]: 241 245 """Retrieve information about a content object 242 246 243 247 Args: 244 248 swhid: object persistent identifier 249 typify: if True, convert return value to pythonic types wherever 250 possible, otherwise return raw JSON types (default: True) second line should be indented to be correct Sphinx/Napoleon markup, see: https://wiki.softwareheritage.org/wiki/Sphinx_gotchas#Args
Some references in the commit message have been migrated:
- T2646 is now #2646 (closed)
Build is green
Patch application report for D4160 (id=14666)
Rebasing onto 677e9856...
Current branch diff-target is up to date.
Changes applied before test
commit 5d04bc970f17dab54e97916b55cd850c3603f6bd Author: Thibault Allançon <haltode@gmail.com> Date: Tue Oct 6 14:28:03 2020 +0200 client: make API response typify-ing optional Closes #2646.
See https://jenkins.softwareheritage.org/job/DWCLI/job/tests-on-diff/23/ for more details.
Please register or sign in to reply