Coding style (linting).
This commit is contained in:
parent
71dc9df58c
commit
9d143a4dd9
5 changed files with 45 additions and 47 deletions
|
|
@ -10,7 +10,8 @@
|
|||
│by selecting this status indicator with the cursor. The types of status are │
|
||||
│listed below. │
|
||||
│ │
|
||||
│The reports are cached in the codebase's root directory in a ".vigil" directory. │
|
||||
│The reports are cached in the codebase's root directory in a ".vigil" │
|
||||
│directory. │
|
||||
│ │
|
||||
│Keys: │
|
||||
│ [0m[38;2;0;255;0m[48;2;0;0;0mh[0m[38;2;255;255;255m[48;2;0;0;0m - Show the help screen. (toggle) │
|
||||
|
|
@ -56,5 +57,4 @@
|
|||
│ │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────────────┘[0m
|
||||
1
tools.py
1
tools.py
|
|
@ -17,7 +17,6 @@ import os.path
|
|||
import pickle
|
||||
import pwd
|
||||
import stat
|
||||
import string
|
||||
import subprocess
|
||||
import tempfile
|
||||
import time
|
||||
|
|
|
|||
81
vigil
81
vigil
|
|
@ -15,10 +15,41 @@ A status indicator summarises the state of each report, and a report is viewed
|
|||
by selecting this status indicator with the cursor. The types of status are
|
||||
listed below.
|
||||
|
||||
The reports are cached in the codebase's root directory in a ".vigil" directory.
|
||||
The reports are cached in the codebase's root directory in a ".vigil"
|
||||
directory.
|
||||
"""
|
||||
|
||||
|
||||
import asyncio
|
||||
import collections
|
||||
import contextlib
|
||||
import functools
|
||||
import gzip
|
||||
import multiprocessing
|
||||
import os
|
||||
import pickle
|
||||
import shutil
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
|
||||
import docopt
|
||||
import pyinotify
|
||||
import urwid
|
||||
import urwid.raw_display
|
||||
|
||||
import fill3
|
||||
import sandbox_fs
|
||||
import terminal
|
||||
import termstr
|
||||
import tools
|
||||
import worker
|
||||
|
||||
|
||||
USAGE = """
|
||||
Usage:
|
||||
vigil [options] <directory>
|
||||
|
|
@ -55,36 +86,6 @@ KEYS_DOC = """Keys:
|
|||
"""
|
||||
|
||||
|
||||
import asyncio
|
||||
import collections
|
||||
import contextlib
|
||||
import functools
|
||||
import gzip
|
||||
import multiprocessing
|
||||
import os
|
||||
import pickle
|
||||
import shutil
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
|
||||
import docopt
|
||||
import pyinotify
|
||||
import urwid
|
||||
import urwid.raw_display
|
||||
|
||||
import fill3
|
||||
import sandbox_fs
|
||||
import terminal
|
||||
import termstr
|
||||
import tools
|
||||
import worker
|
||||
|
||||
|
||||
_LOG_PATH = os.path.join(os.getcwd(), "vigil.log")
|
||||
|
||||
|
||||
|
|
@ -686,11 +687,11 @@ class Screen:
|
|||
self._log.log_command("Paused workers." if self._is_paused else
|
||||
"Running workers...")
|
||||
if self._is_paused:
|
||||
for worker in self.workers:
|
||||
worker.pause()
|
||||
for worker_ in self.workers:
|
||||
worker_.pause()
|
||||
else:
|
||||
for worker in self.workers:
|
||||
worker.continue_()
|
||||
for worker_ in self.workers:
|
||||
worker_.continue_()
|
||||
|
||||
def quit_(self):
|
||||
os.kill(os.getpid(), signal.SIGINT)
|
||||
|
|
@ -936,11 +937,11 @@ def main(root_path, loop, worker_count=None, is_sandboxed=True,
|
|||
def exit_loop():
|
||||
log.log_command("Exiting...")
|
||||
time.sleep(0.05)
|
||||
for worker in workers:
|
||||
worker.pause()
|
||||
worker.future.cancel()
|
||||
if worker.result is not None:
|
||||
worker.result.reset()
|
||||
for worker_ in workers:
|
||||
worker_.pause()
|
||||
worker_.future.cancel()
|
||||
if worker_.result is not None:
|
||||
worker_.result.reset()
|
||||
loop.stop()
|
||||
loop.add_signal_handler(signal.SIGWINCH, on_window_resize)
|
||||
loop.add_signal_handler(signal.SIGINT, exit_loop)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
import asyncio
|
||||
import os
|
||||
import signal
|
||||
import subprocess
|
||||
|
||||
import psutil
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import shutil
|
|||
import tempfile
|
||||
import unittest
|
||||
|
||||
import sandbox_fs
|
||||
import tools
|
||||
import vigil
|
||||
import worker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue