diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..fc1c641 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.4.0 + hooks: + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - id: end-of-file-fixer + - id: check-toml + - id: check-added-large-files + - id: debug-statements + - repo: https://gitlab.com/pycqa/flake8 + rev: "master" # pick a git hash / tag to point to + hooks: + - id: flake8 + additional_dependencies: [flake8-import-order, flake8-bugbear] diff --git a/.travis.yml b/.travis.yml index 2b1695c..aec0f9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,4 +69,4 @@ "make -e $BUILD" ], "sudo": true -} \ No newline at end of file +} diff --git a/Makefile b/Makefile index 3be76ed..7efe354 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ install-test: install-servers install-dev install-style: install-docs install-dev pip install -U flake8 flake8-import-order flake8-bugbear autopep8 - + style: flake8 ! git grep -i syncroniz */* diff --git a/docs/changelog.rst b/docs/changelog.rst index 1743454..565b052 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1 +1 @@ -.. include:: ../CHANGELOG.rst +.. include:: ../CHANGELOG.rst diff --git a/docs/config.rst b/docs/config.rst index c54b0cd..425f740 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -286,7 +286,7 @@ Service to hardcode those into opensource software [googleterms]_: 3. In the sidebar, select "Credentials" and create a new "OAuth Client ID". The application type is "Other". - + You'll be prompted to create a OAuth consent screen first. Fill out that form however you like. @@ -368,7 +368,7 @@ password. Neither are stored. secrets_dir = ... #server_path = ... #db_path = ... - + :param email: The email address of your account. :param secrets_dir: A directory where vdirsyncer can store the encryption key and authentication token. @@ -386,7 +386,7 @@ password. Neither are stored. secrets_dir = ... #server_path = ... #db_path = ... - + :param email: The email address of your account. :param secrets_dir: A directory where vdirsyncer can store the encryption key and authentication token. diff --git a/docs/keyring.rst b/docs/keyring.rst index 2447f96..b3fc442 100644 --- a/docs/keyring.rst +++ b/docs/keyring.rst @@ -60,7 +60,7 @@ passwords from the OS's password store. Installation:: Basic usage:: password.fetch = ["command", "keyring", "get", "example.com", "foouser"] - + .. _keyring: https://github.com/jaraco/keyring/ Password Prompt diff --git a/docs/tutorials/claws-mail.rst b/docs/tutorials/claws-mail.rst index 337b863..35e11af 100644 --- a/docs/tutorials/claws-mail.rst +++ b/docs/tutorials/claws-mail.rst @@ -77,7 +77,7 @@ Then search for the for the vCard in the folder **~/.contacts/**. Click ok, and you we will see your contacts. .. note:: - + Claws-Mail shows only contacts that have a mail address. Crontab diff --git a/docs/when.rst b/docs/when.rst index b69aed4..a7ae997 100644 --- a/docs/when.rst +++ b/docs/when.rst @@ -39,7 +39,7 @@ program chosen: * Like with ``todo.txt``, Dropbox and friends are obviously agnostic/unaware of the files' contents. If a file has changed on both sides, Dropbox just copies both versions to both sides. - + This is a good idea if the user is directly interfacing with the file system and is able to resolve conflicts themselves. Here it might lead to erroneous behavior with e.g. ``khal``, since there are now two events with diff --git a/scripts/dpkg.Dockerfile b/scripts/dpkg.Dockerfile index 78c8aab..09d9f24 100644 --- a/scripts/dpkg.Dockerfile +++ b/scripts/dpkg.Dockerfile @@ -9,7 +9,7 @@ ARG distrover RUN apt-get update RUN apt-get install -y build-essential fakeroot debhelper git RUN apt-get install -y python3-all python3-pip -RUN apt-get install -y ruby ruby-dev +RUN apt-get install -y ruby ruby-dev RUN apt-get install -y python-all python-pip RUN gem install fpm