Revision b6202a0cf154a0e0e7cbacf165a995cc37e5cd3e authored by Valentin Lorentz on 29 July 2020, 08:26:32 UTC, committed by Valentin Lorentz on 29 July 2020, 14:24:11 UTC
1. clients crash when they call the API with an iterator 2. some backend implementations violate the contract by assuming the argument is a sequence (eg. by iterating twice on it, and assuming the elements are the same) 3. no matter what we do, the endpoints will always get a list as argument in practice, because they go through the RPC framework 4. there is no concrete (ha!) advantage in taking an Iterable rather than a List.
1 parent 21b7730
.pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: flake8
- id: check-json
- id: check-yaml
- repo: https://github.com/codespell-project/codespell
rev: v1.16.0
hooks:
- id: codespell
exclude: TODO
args: [-L iff]
- repo: local
hooks:
- id: mypy
name: mypy
entry: mypy
args: [swh]
pass_filenames: false
language: system
types: [python]
- id: check-bumped-dbversion
name: check-bumped-dbversion
files: 'sql/upgrades/.*\.sql'
entry: grep
args: ['insert into dbversion']
language: system
- repo: https://github.com/python/black
rev: 19.10b0
hooks:
- id: black
# unfortunately, we are far from being able to enable this...
#- repo: https://github.com/PyCQA/pydocstyle.git
# rev: 4.0.0
# hooks:
# - id: pydocstyle
# name: pydocstyle
# description: pydocstyle is a static analysis tool for checking compliance with Python docstring conventions.
# entry: pydocstyle --convention=google
# language: python
# types: [python]
Computing file changes ...