mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-24 14:27:41 +00:00
Tweak linter to ignore less issues
This commit is contained in:
parent
9d3ef030fa
commit
320ac6020b
3 changed files with 11 additions and 12 deletions
16
setup.cfg
16
setup.cfg
|
|
@ -11,12 +11,12 @@ addopts =
|
||||||
--no-cov-on-fail
|
--no-cov-on-fail
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E731: Use a def instead of lambda expr
|
application-import-names = tests,vdirsyncer
|
||||||
# E743: Ambiguous function definition
|
extend-ignore =
|
||||||
ignore = E731, E743
|
E203, # Black-incompatible colon spacing.
|
||||||
# E503: Line break occurred before a binary operator
|
W503, # Line jump before binary operator.
|
||||||
extend-ignore = E203, W503
|
I100,
|
||||||
|
I202
|
||||||
max-line-length = 88
|
max-line-length = 88
|
||||||
select = C,E,F,W,B,B9
|
exclude = .eggs,build
|
||||||
exclude = .eggs, tests/storage/servers/owncloud/, tests/storage/servers/nextcloud/, tests/storage/servers/baikal/, build/
|
import-order-style = smarkets
|
||||||
application-package-names = tests,vdirsyncer
|
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,7 @@ class GoogleSession(dav.DAVSession):
|
||||||
|
|
||||||
token_file = expand_path(token_file)
|
token_file = expand_path(token_file)
|
||||||
ui_worker = get_ui_worker()
|
ui_worker = get_ui_worker()
|
||||||
f = lambda: self._init_token(token_file, client_id, client_secret)
|
ui_worker.put(lambda: self._init_token(token_file, client_id, client_secret))
|
||||||
ui_worker.put(f)
|
|
||||||
|
|
||||||
def _init_token(self, token_file, client_id, client_secret):
|
def _init_token(self, token_file, client_id, client_secret):
|
||||||
token = None
|
token = None
|
||||||
|
|
|
||||||
|
|
@ -127,9 +127,9 @@ def sync(
|
||||||
raise BothReadOnly()
|
raise BothReadOnly()
|
||||||
|
|
||||||
if conflict_resolution == "a wins":
|
if conflict_resolution == "a wins":
|
||||||
conflict_resolution = lambda a, b: a
|
conflict_resolution = lambda a, b: a # noqa: E731
|
||||||
elif conflict_resolution == "b wins":
|
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))
|
status_nonempty = bool(next(status.iter_old(), None))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue