Tweak linter to ignore less issues

This commit is contained in:
Hugo Osvaldo Barrera 2021-06-12 12:58:13 +02:00
parent 9d3ef030fa
commit 320ac6020b
3 changed files with 11 additions and 12 deletions

View file

@ -11,12 +11,12 @@ addopts =
--no-cov-on-fail
[flake8]
# E731: Use a def instead of lambda expr
# E743: Ambiguous function definition
ignore = E731, E743
# E503: Line break occurred before a binary operator
extend-ignore = E203, W503
application-import-names = tests,vdirsyncer
extend-ignore =
E203, # Black-incompatible colon spacing.
W503, # Line jump before binary operator.
I100,
I202
max-line-length = 88
select = C,E,F,W,B,B9
exclude = .eggs, tests/storage/servers/owncloud/, tests/storage/servers/nextcloud/, tests/storage/servers/baikal/, build/
application-package-names = tests,vdirsyncer
exclude = .eggs,build
import-order-style = smarkets

View file

@ -42,8 +42,7 @@ class GoogleSession(dav.DAVSession):
token_file = expand_path(token_file)
ui_worker = get_ui_worker()
f = lambda: self._init_token(token_file, client_id, client_secret)
ui_worker.put(f)
ui_worker.put(lambda: self._init_token(token_file, client_id, client_secret))
def _init_token(self, token_file, client_id, client_secret):
token = None

View file

@ -127,9 +127,9 @@ def sync(
raise BothReadOnly()
if conflict_resolution == "a wins":
conflict_resolution = lambda a, b: a
conflict_resolution = lambda a, b: a # noqa: E731
elif conflict_resolution == "b wins":
conflict_resolution = lambda a, b: b
conflict_resolution = lambda a, b: b # noqa: E731
status_nonempty = bool(next(status.iter_old(), None))