Anders Kaseorg
72d6ff3c3b
docs: Fix more capitalization issues.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-23 11:46:55 -07:00
Anders Kaseorg
b4597a8ca8
python: Elide default for store_{true,false} argparse arguments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-03 16:17:14 -07:00
Anders Kaseorg
a5dbab8fb0
python: Remove redundant dest for argparse arguments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-02 11:04:10 -07:00
Anders Kaseorg
123d527c9e
check-issue-labels: Fix configparser import.
...
Commit ccf2792c1c
(#7296 ) migrated this
incorrectly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-24 19:26:02 -07:00
Anders Kaseorg
365fe0b3d5
python: Sort imports with isort.
...
Fixes #2665 .
Regenerated by tabbott with `lint --fix` after a rebase and change in
parameters.
Note from tabbott: In a few cases, this converts technical debt in the
form of unsorted imports into different technical debt in the form of
our largest files having very long, ugly import sequences at the
start. I expect this change will increase pressure for us to split
those files, which isn't a bad thing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-11 16:45:32 -07:00
Anders Kaseorg
67e7a3631d
python: Convert percent formatting to Python 3.6 f-strings.
...
Generated by pyupgrade --py36-plus.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-10 15:02:09 -07:00
Anders Kaseorg
f8339f019d
python: Convert assignment type annotations to Python 3.6 style.
...
Commit split by tabbott; this has changes to scripts/, tools/, and
puppet/.
scripts/lib/hash_reqs.py, scripts/lib/setup_venv.py,
scripts/lib/zulip_tools.py, and tools/lib/provision.py are excluded so
tools/provision still gives the right error message on Ubuntu 16.04
with Python 3.5.
Generated by com2ann, with whitespace fixes and various manual fixes
for runtime issues:
-shebang_rules: List[Rule] = [
+shebang_rules: List["Rule"] = [
-trailing_whitespace_rule: Rule = {
+trailing_whitespace_rule: "Rule" = {
-whitespace_rules: List[Rule] = [
+whitespace_rules: List["Rule"] = [
-comma_whitespace_rule: List[Rule] = [
+comma_whitespace_rule: List["Rule"] = [
-prose_style_rules: List[Rule] = [
+prose_style_rules: List["Rule"] = [
-html_rules: List[Rule] = whitespace_rules + prose_style_rules + [
+html_rules: List["Rule"] = whitespace_rules + prose_style_rules + [
- target_port: int = None
+ target_port: int
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-24 13:06:54 -07:00
Anders Kaseorg
5901e7ba7e
python: Convert function type annotations to Python 3 style.
...
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and six fixes for runtime issues:
- def __init__(self, token: Token, parent: Optional[Node]) -> None:
+ def __init__(self, token: Token, parent: "Optional[Node]") -> None:
-def main(options: argparse.Namespace) -> NoReturn:
+def main(options: argparse.Namespace) -> "NoReturn":
-def fetch_request(url: str, callback: Any, **kwargs: Any) -> Generator[Callable[..., Any], Any, None]:
+def fetch_request(url: str, callback: Any, **kwargs: Any) -> "Generator[Callable[..., Any], Any, None]":
-def assert_server_running(server: subprocess.Popen[bytes], log_file: Optional[str]) -> None:
+def assert_server_running(server: "subprocess.Popen[bytes]", log_file: Optional[str]) -> None:
-def server_is_up(server: subprocess.Popen[bytes], log_file: Optional[str]) -> bool:
+def server_is_up(server: "subprocess.Popen[bytes]", log_file: Optional[str]) -> bool:
- method_kwarg_pairs: List[FuncKwargPair],
+ method_kwarg_pairs: "List[FuncKwargPair]",
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:42:48 -07:00
Anders Kaseorg
643bd18b9f
lint: Fix code that evaded our lint checks for string % non-tuple.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-04-23 15:21:37 -07:00
Anders Kaseorg
ee8ff4df66
tools: Remove unused imports.
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-02 17:10:31 -08:00
Aditya Bansal
addfde7374
tools: Change use of typing.Text to str.
2018-05-13 17:17:32 -07:00
rht
ccf2792c1c
refactor: Remove six.moves.configparser import.
2017-11-07 10:51:44 -08:00
rht
f15bdce90e
tools: Remove print_function.
...
Tweaked by tabbott to exclude the linter libraries.
2017-09-29 15:44:56 -07:00
Greg Price
a099e698e2
py3: Switch almost all shebang lines to use `python3`.
...
This causes `upgrade-zulip-from-git`, as well as a no-option run of
`tools/build-release-tarball`, to produce a Zulip install running
Python 3, rather than Python 2. In particular this means that the
virtualenv we create, in which all application code runs, is Python 3.
One shebang line, on `zulip-ec2-configure-interfaces`, explicitly
keeps Python 2, and at least one external ops script, `wal-e`, also
still runs on Python 2. See discussion on the respective previous
commits that made those explicit. There may also be some other
third-party scripts we use, outside of this source tree and running
outside our virtualenv, that still run on Python 2.
2017-08-16 17:54:43 -07:00
neiljp (Neil Pilgrim)
e5c446c9b3
mypy: Set get_next_page_url in check-issue-labels to return Optional.
2017-08-03 11:03:14 -07:00
hackerkid
90f8eb7c52
Add tool for scanning issues without area labels.
...
Fixes #3495
2017-02-03 09:59:35 -08:00