mirror of https://github.com/zulip/zulip.git
docs: Move mypy documentation from contributing to testing.
The testing section is more appropriate, since it's fundamentally part of our CI system. While we're at it, fix the fact that we were linking to GitHub, not ReadTheDocs, in the run-mypy output.
This commit is contained in:
parent
a3c4ea51f0
commit
3003517430
|
@ -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
|
||||
|
|
|
@ -7,7 +7,6 @@ Code Contribution Guide
|
|||
|
||||
version-control
|
||||
code-style
|
||||
mypy
|
||||
code-reviewing
|
||||
chat-zulip-org
|
||||
zulipbot-usage
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -10,5 +10,6 @@ Code Testing
|
|||
testing-with-django
|
||||
testing-with-node
|
||||
testing-with-casper
|
||||
mypy
|
||||
travis
|
||||
manual-testing
|
||||
|
|
|
@ -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`.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue