Commit 9a2ef5a1 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Add pre-commit hook

parent bbf4cc8c
Pipeline #84172 passed with stages
in 6 minutes and 31 seconds
#!/bin/sh
if ! which flake8 &> /dev/null; then
echo "Please install flake8 first"
exit -1
fi
echo "--Checking style--"
flake8 --ignore E402,W503,E501 --show-source src/ --exclude __init__.py
if test $? != 0; then
echo "--Checking style fail--"
echo "Please fix the above issues"
exit -1
else
echo "--Checking style pass--"
fi
......@@ -53,6 +53,13 @@ pythondir = get_option('prefix') / python.sysconfig_path('purelib')
podir = meson.source_root() / 'po'
if profile != 'default'
# Setup pre-commit hook for ensuring coding style is always consistent
message('Setting up git pre-commit hook..')
run_command('cp', '-f', 'hooks/pre-commit.hook', '.git/hooks/pre-commit')
endif
subdir('data')
subdir('po')
subdir('src')
......
......@@ -60,7 +60,7 @@ class ProviderImage(Gtk.Stack):
self.set_image(self.provider.image)
self.set_visible_child_name("provider_image")
def emit(self, *args):
GLib.idle_add(GObject.GObject.emit, self, *args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment