zulip/scripts/setup
Anders Kaseorg 69730a78cc python: Use trailing commas consistently.
Automatically generated by the following script, based on the output
of lint with flake8-comma:

import re
import sys

last_filename = None
last_row = None
lines = []

for msg in sys.stdin:
    m = re.match(
        r"\x1b\[35mflake8    \|\x1b\[0m \x1b\[1;31m(.+):(\d+):(\d+): (\w+)", msg
    )
    if m:
        filename, row_str, col_str, err = m.groups()
        row, col = int(row_str), int(col_str)

        if filename == last_filename:
            assert last_row != row
        else:
            if last_filename is not None:
                with open(last_filename, "w") as f:
                    f.writelines(lines)

            with open(filename) as f:
                lines = f.readlines()
            last_filename = filename
        last_row = row

        line = lines[row - 1]
        if err in ["C812", "C815"]:
            lines[row - 1] = line[: col - 1] + "," + line[col - 1 :]
        elif err in ["C819"]:
            assert line[col - 2] == ","
            lines[row - 1] = line[: col - 2] + line[col - 1 :].lstrip(" ")

if last_filename is not None:
    with open(last_filename, "w") as f:
        f.writelines(lines)

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-06-11 16:04:12 -07:00
..
configure-rabbitmq configure-rabbitmq: Allow running as root. 2019-04-04 16:52:20 -07:00
create-db.sql create-db.sql: Start by dropping the zulip database if needed. 2020-01-15 18:04:34 -08:00
create-pgroonga.sql postgres-create-db: Split into non-pgroonga and pgroonga scripts. 2019-07-17 16:18:22 -07:00
debathena-archive.asc scripts: Initialize setup-apt-repo-debathena. 2018-12-11 13:01:26 -08:00
flush-memcached python: Use trailing commas consistently. 2020-06-11 16:04:12 -07:00
generate-self-signed-cert generate-self-signed-cert: Generalize to CentOS, Fedora, RHEL. 2019-01-05 15:49:02 -08:00
generate_secrets.py python: Use trailing commas consistently. 2020-06-11 16:04:12 -07:00
initialize-database install: Don't create internal realm in the installation process. 2020-02-12 12:00:10 -08:00
inline_email_css.py python: Convert percent formatting to Python 3.6 f-strings. 2020-06-10 15:02:09 -07:00
install install, provision: Treat all nonzero exit codes as failure, not just 1. 2019-07-19 11:22:11 -07:00
install-wal-g.sh puppet: Install wal-g, not wal-e. 2020-06-11 15:52:43 -07:00
pgroonga-debian.asc setup: Update groonga APT repository signing key. 2019-09-23 16:01:39 -07:00
pgroonga-ppa.asc scripts: Stop using apt-add-repository. 2016-10-11 22:10:36 -07:00
postgres-init-db postgres-init-db: Fix invocation from a relative path. 2020-02-19 14:40:37 -08:00
restore-backup python: Use trailing commas consistently. 2020-06-11 16:04:12 -07:00
setup-certbot certbot: Switch to use certbot from apt. 2020-06-08 21:59:29 -07:00
terminate-psql-sessions terminate-psql-sessions: Only terminate if we have permissions. 2019-04-23 14:41:42 -07:00