Browse code

lint: add pylint config file and de-lint existing modules

Joseph Weston authored on 06/09/2017 01:43:53
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,2 @@
1
+[MESSAGES CONTROL]
2
+disable=broad-except
... ...
@@ -30,6 +30,8 @@ def silence(*exceptions_to_silence):
30 30
 
31 31
     this is a coroutine decorator.
32 32
     """
33
+
34
+    # pylint: disable=missing-docstring
33 35
     async def wrapper(func, *args, **kwargs):
34 36
         try:
35 37
             return await func(*args, **kwargs)
... ...
@@ -47,6 +49,7 @@ def async_lru_cache(size=float('inf')):
47 49
     """LRU cache for coroutines."""
48 50
     cache = OrderedDict()
49 51
 
52
+    # pylint: disable=missing-docstring
50 53
     async def memoized(func, *args, **kwargs):
51 54
         key = str((args, kwargs))
52 55
         if key not in cache:
... ...
@@ -106,6 +109,7 @@ async def lock_subprocess(*args, lockfile, **kwargs):
106 109
     file.write(str(os.getpid()))  # write pid to lockfile
107 110
     file.flush()
108 111
 
112
+    # pylint: disable=missing-docstring
109 113
     def unlock(*_):
110 114
         fcntl.flock(file, fcntl.LOCK_UN)
111 115
         file.truncate(0)
... ...
@@ -61,7 +61,7 @@ async def start(config, username, password):
61 61
     cmd = ['sudo', '-n', OPENVPN_EXECUTABLE,
62 62
            '--suppress-timestamps',
63 63
            '--config', config_file.name,
64
-           '--auth-user-pass', credentials_file.name
64
+           '--auth-user-pass', credentials_file.name,
65 65
           ]
66 66
 
67 67
     proc = None