diff --git a/Makefile b/Makefile index 32e4141..2113b17 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ install-test: install-servers [ -z "$(TEST_EXTRA_PACKAGES)" ] || pip install $(TEST_EXTRA_PACKAGES) install-style: install-docs - pip install flake8 flake8-import-order 'flake8-bugbear>=17.3.0' autopep8 + pip install flake8 flake8-import-order 'flake8-bugbear>=17.3.0' style: flake8 @@ -123,13 +123,6 @@ install-dev: pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \ fi -install-git-hooks: install-style - echo "make style-autocorrect" > .git/hooks/pre-commit - chmod +x .git/hooks/pre-commit - -style-autocorrect: - git diff --cached --name-only | egrep '\.py$$' | xargs --no-run-if-empty autopep8 -ri - ssh-submodule-urls: git submodule foreach "\ echo -n 'Old: '; \ diff --git a/vdirsyncer/sync/__init__.py b/vdirsyncer/sync/__init__.py index 7a35389..077d4d0 100644 --- a/vdirsyncer/sync/__init__.py +++ b/vdirsyncer/sync/__init__.py @@ -129,9 +129,9 @@ def sync(storage_a, storage_b, status, conflict_resolution=None, raise BothReadOnly() if conflict_resolution == 'a wins': - def conflict_resolution(a, b): return a + conflict_resolution = lambda a, b: a elif conflict_resolution == 'b wins': - def conflict_resolution(a, b): return b + conflict_resolution = lambda a, b: b status_nonempty = bool(next(status.iter_old(), None))