Use the ellipsis unicode character.

This commit is contained in:
Andrew Hamilton 2019-06-22 13:29:34 +10:00
parent 92b99d9b23
commit 36027a90f2
7 changed files with 20 additions and 20 deletions

View file

@ -800,7 +800,7 @@ class Screen:
line_num = (self._summary.get_selection().entry[0]. line_num = (self._summary.get_selection().entry[0].
scroll_position[1] + 1) scroll_position[1] + 1)
self._log.log_message([in_green("Editing "), path_colored, self._log.log_message([in_green("Editing "), path_colored,
in_green(f" at line {line_num}...")]) in_green(f" at line {line_num}")])
subprocess.Popen(f"{self.editor_command} +{line_num} {path}", subprocess.Popen(f"{self.editor_command} +{line_num} {path}",
shell=True, stdout=subprocess.PIPE, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
@ -819,7 +819,7 @@ class Screen:
def toggle_pause(self): def toggle_pause(self):
self._is_paused = not self._is_paused self._is_paused = not self._is_paused
self._log.log_command("Paused workers." if self._is_paused else self._log.log_command("Paused workers." if self._is_paused else
"Running workers...") "Running workers")
if self._is_paused: if self._is_paused:
for worker_ in self.workers: for worker_ in self.workers:
worker_.pause() worker_.pause()
@ -836,14 +836,14 @@ class Screen:
path_colored = tools.path_colored(selection.path) path_colored = tools.path_colored(selection.path)
self._log.log_message([in_green("Refreshing "), tool_name, self._log.log_message([in_green("Refreshing "), tool_name,
in_green(" result of "), path_colored, in_green(" result of "), path_colored,
in_green("...")]) in_green("")])
self._summary.refresh_result(selection) self._summary.refresh_result(selection)
def refresh_tool(self): def refresh_tool(self):
selection = self._summary.get_selection() selection = self._summary.get_selection()
tool_name = tools.tool_name_colored(selection.tool, selection.path) tool_name = tools.tool_name_colored(selection.tool, selection.path)
self._log.log_message([in_green("Refreshing all results of "), self._log.log_message([in_green("Refreshing all results of "),
tool_name, in_green("...")]) tool_name, in_green("")])
self._summary.refresh_tool(selection.tool) self._summary.refresh_tool(selection.tool)
_DIMMED_BORDER = [termstr.TermStr(part).fg_color(termstr.Color.grey_100) _DIMMED_BORDER = [termstr.TermStr(part).fg_color(termstr.Color.grey_100)
@ -867,7 +867,7 @@ class Screen:
path = self._summary.get_selection().path path = self._summary.get_selection().path
path_colored = tools.path_colored(path) path_colored = tools.path_colored(path)
self._log.log_message([in_green("Opening "), path_colored, self._log.log_message([in_green("Opening "), path_colored,
in_green("...")]) in_green("")])
subprocess.Popen(["xdg-open", path], stdout=subprocess.PIPE, subprocess.Popen(["xdg-open", path], stdout=subprocess.PIPE,
stderr=subprocess.PIPE) stderr=subprocess.PIPE)
@ -1089,11 +1089,11 @@ def main(root_path, loop, worker_count=None, editor_command=None, theme=None,
notifier = setup_inotify(root_path, loop, on_filesystem_change, notifier = setup_inotify(root_path, loop, on_filesystem_change,
is_path_excluded) is_path_excluded)
try: try:
log.log_message(f"Starting workers ({worker_count}) ...") log.log_message(f"Starting workers ({worker_count}) ")
screen.make_workers(worker_count, is_being_tested) screen.make_workers(worker_count, is_being_tested)
def exit_loop(): def exit_loop():
log.log_command("Exiting...") log.log_command("Exiting")
time.sleep(0.05) time.sleep(0.05)
screen.stop_workers() screen.stop_workers()
loop.stop() loop.stop()
@ -1120,7 +1120,7 @@ def manage_cache(root_path):
if os.path.exists(cache_path) and \ if os.path.exists(cache_path) and \
os.stat(__file__).st_mtime > os.stat(timestamp_path).st_mtime: os.stat(__file__).st_mtime > os.stat(timestamp_path).st_mtime:
print("Eris has been updated, so clearing the cache and" print("Eris has been updated, so clearing the cache and"
" recalculating all results...") " recalculating all results")
shutil.rmtree(cache_path) shutil.rmtree(cache_path)
if not os.path.exists(cache_path): if not os.path.exists(cache_path):
os.mkdir(cache_path) os.mkdir(cache_path)

View file

@ -585,7 +585,7 @@ class Result:
async def run(self, log, appearance_changed_event, runner): async def run(self, log, appearance_changed_event, runner):
tool_name = tool_name_colored(self.tool, self.path) tool_name = tool_name_colored(self.tool, self.path)
path = path_colored(self.path) path = path_colored(self.path)
log.log_message(["Running ", tool_name, " on ", path, "..."]) log.log_message(["Running ", tool_name, " on ", path, ""])
self.set_status(Status.running) self.set_status(Status.running)
if runner.is_already_paused: if runner.is_already_paused:
runner.is_already_paused = False runner.is_already_paused = False

View file

@ -67,7 +67,7 @@ def make_summary_page(project_name, summary):
def run(server_class=http.server.HTTPServer, handler_class=Webserver, port=80): def run(server_class=http.server.HTTPServer, handler_class=Webserver, port=80):
server_address = ("", port) server_address = ("", port)
httpd = server_class(server_address, handler_class) httpd = server_class(server_address, handler_class)
print("Starting httpd...") print("Starting httpd")
httpd.serve_forever() httpd.serve_forever()

View file

@ -12,7 +12,7 @@ import eris.tools as tools
class Worker: class Worker:
AUTOSAVE_MESSAGE = "Auto-saving..." AUTOSAVE_MESSAGE = "Auto-saving"
unsaved_jobs_total = 0 unsaved_jobs_total = 0
def __init__(self, is_already_paused, is_being_tested): def __init__(self, is_already_paused, is_being_tested):

View file

@ -12,9 +12,9 @@ if [ $DIST_ID != "ubuntu" ]; then
echo "Eris can only be installed on Ubuntu." echo "Eris can only be installed on Ubuntu."
exit 1 exit 1
fi fi
echo "Installing the dependencies of the eris script..." echo "Installing the dependencies of the eris script"
sudo apt --yes install python3.7 util-linux sudo apt --yes install python3.7 util-linux
python3.7 -m pip install pyinotify pygments docopt pillow toml python3.7 -m pip install pyinotify pygments docopt pillow toml
echo echo
echo "Installing all the tools eris may need..." echo "Installing all the tools eris may need"
./install-tools ./install-tools

View file

@ -8,7 +8,7 @@ FAILURE=0
CODEBASE_PATH=$(dirname $0) CODEBASE_PATH=$(dirname $0)
cd ${CODEBASE_PATH}/tests cd ${CODEBASE_PATH}/tests
for test in *_test.py; do for test in *_test.py; do
echo "Testing $test ..." echo "Testing $test "
./${test} 2>&1 ./${test} 2>&1
FAILURE=$(($FAILURE | $?)) FAILURE=$(($FAILURE | $?))
echo echo

View file

@ -133,19 +133,19 @@ def main():
if os.path.exists(distribution): if os.path.exists(distribution):
print(distribution, "container already exists.") print(distribution, "container already exists.")
else: else:
print(f"Building {distribution} container...") print(f"Building {distribution} container")
globals()["build_" + distribution]() globals()["build_" + distribution]()
print(f"Installing eris's dependencies in {distribution}...") print(f"Installing eris's dependencies in {distribution}")
run_in_container(distribution, "./install-dependencies") run_in_container(distribution, "./install-dependencies")
print(f"Installing eris in {distribution}...") print(f"Installing eris in {distribution}")
run_in_container(distribution, "apt-get install --yes python3-pip") run_in_container(distribution, "apt-get install --yes python3-pip")
run_in_container(distribution, "pip3 install .") run_in_container(distribution, "pip3 install .")
print(f"Testing eris in {distribution}...") print(f"Testing eris in {distribution}")
run_in_container(distribution, "./test-all") run_in_container(distribution, "./test-all")
print(f"Running eris in {distribution}...") print(f"Running eris in {distribution}")
run_in_container(distribution, "eris --help") run_in_container(distribution, "eris --help")
print(f"Successfully installed eris in {distribution}.") print(f"Successfully installed eris in {distribution}.")
print(f"Removing {distribution} container...") print(f"Removing {distribution} container")
try: try:
globals()["remove_" + distribution]() globals()["remove_" + distribution]()
except KeyError: except KeyError: