diff --git a/docs/contributing/code-reviewing.md b/docs/contributing/code-reviewing.md index 67d5c6c4bb..b89cc87185 100644 --- a/docs/contributing/code-reviewing.md +++ b/docs/contributing/code-reviewing.md @@ -166,7 +166,7 @@ Some points specific to the Zulip server codebase: * *mypy annotations.* New functions should be annotated using [mypy] and existing annotations should be updated. Use of `Any`, `ignore`, - and unparameterized containser should be limited to cases where a + and unparameterized containers should be limited to cases where a more precise type cannot be specified. ## Tooling @@ -197,6 +197,6 @@ We also strongly recommend reviewers to go through the following resources. [code-style]: ../contributing/code-style.html [commit-messages]: ../contributing/version-control.html#commit-messages [test-writing]: ../testing/testing.html -[mypy]: ../contributing/mypy.html +[mypy]: ../testing/mypy.html [git tool]: ../git/zulip-tools.html#fetch-a-pull-request-and-rebase [translation]: ../translating/translating.html diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst index 968562f72d..638d4d5685 100644 --- a/docs/contributing/index.rst +++ b/docs/contributing/index.rst @@ -7,7 +7,6 @@ Code Contribution Guide version-control code-style - mypy code-reviewing chat-zulip-org zulipbot-usage diff --git a/docs/git/overview.md b/docs/git/overview.md index 85b5f2d7fd..c35222be23 100644 --- a/docs/git/overview.md +++ b/docs/git/overview.md @@ -65,7 +65,7 @@ git workflow, or if you'd like a git refresher. [zulip-rtd-commit-messages]: ../contributing/version-control.html#commit-messages [zulip-rtd-dev-overview]: ../development/overview.html [zulip-rtd-lint-tools]: ../contributing/code-style.html#lint-tools -[zulip-rtd-mypy]: ../contributing/mypy.html +[zulip-rtd-mypy]: ../testing/mypy.html [zulip-rtd-testing]: ../testing/testing.html [zulip-rtd-zulip-tools]: ../git/zulip-tools.html [zulip-rtd-zulipbot-usage]: ../contributing/zulipbot-usage.html diff --git a/docs/overview/gsoc-ideas.md b/docs/overview/gsoc-ideas.md index a2cdd9baa9..dea50a222e 100644 --- a/docs/overview/gsoc-ideas.md +++ b/docs/overview/gsoc-ideas.md @@ -448,7 +448,7 @@ Expert: Tommy Ip, Tim Abbott. single area). A possible specific larger project in this space is working on - adding [mypy](../contributing/mypy.html) stubs + adding [mypy](../testing/mypy.html) stubs for Django in mypy to make our type checking more powerful. Read [our mypy blog post](https://blog.zulip.org/2016/10/13/static-types-in-python-oh-mypy/) for details on how mypy works and is integrated into zulip. This diff --git a/docs/subsystems/dependencies.md b/docs/subsystems/dependencies.md index d4f2591ff0..20e0c244bf 100644 --- a/docs/subsystems/dependencies.md +++ b/docs/subsystems/dependencies.md @@ -202,7 +202,7 @@ highlighting. The system is largely managed by the code in `ignore_missing_imports` for the new library. See [our mypy docs][mypy-docs] for more details. -[mypy-docs]: ../contributing/mypy.html +[mypy-docs]: ../testing/mypy.html ## JavaScript and other frontend packages diff --git a/docs/testing/index.rst b/docs/testing/index.rst index 28dea1f8c9..4ffd57b6f3 100644 --- a/docs/testing/index.rst +++ b/docs/testing/index.rst @@ -10,5 +10,6 @@ Code Testing testing-with-django testing-with-node testing-with-casper + mypy travis manual-testing diff --git a/docs/testing/linters.md b/docs/testing/linters.md index 9f41d82a85..a528e38c2c 100644 --- a/docs/testing/linters.md +++ b/docs/testing/linters.md @@ -104,7 +104,7 @@ The remaining lint checks occur in `./tools/run-mypy`. It is probably somewhat of an understatement to call "mypy" a "linter," as it performs static code analysis of Python type annotations throughout our Python codebase. -Our [documentation on using mypy](../contributing/mypy.html) covers mypy in more detail. +Our [documentation on using mypy](../testing/mypy.html) covers mypy in more detail. The rest of this document pertains to the checks that occur in `./tools/lint`. diff --git a/docs/contributing/mypy.md b/docs/testing/mypy.md similarity index 100% rename from docs/contributing/mypy.md rename to docs/testing/mypy.md diff --git a/templates/zerver/api/incoming-webhooks-walkthrough.md b/templates/zerver/api/incoming-webhooks-walkthrough.md index c9f67660fb..e90e041137 100644 --- a/templates/zerver/api/incoming-webhooks-walkthrough.md +++ b/templates/zerver/api/incoming-webhooks-walkthrough.md @@ -130,7 +130,7 @@ it must exist before a message can be created in it. (See [Step 4: Create tests](#step-4-create-tests) for how to handle this in tests.) The line that begins `# type` is a mypy type annotation. See [this -page](https://zulip.readthedocs.io/en/latest/contributing/mypy.html) for details about +page](https://zulip.readthedocs.io/en/latest/testing/mypy.html) for details about how to properly annotate your webhook functions. In the body of the function we define the body of the message as `Hello! I am diff --git a/tools/run-mypy b/tools/run-mypy index dfb0392cae..cafb3fcb6b 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -91,6 +91,6 @@ else: if rc != 0: print("") - print("See https://github.com/zulip/zulip/blob/master/docs/contributing/mypy.md for debugging tips.") + print("See https://zulip.readthedocs.io/en/latest/testing/mypy.html for debugging tips.") sys.exit(rc)