From 0d049e90b876f9e505d523990c2c1cbf6d425713 Mon Sep 17 00:00:00 2001 From: Isaac Beh Date: Sat, 1 Jul 2023 10:50:24 +1000 Subject: [PATCH] Add Pyright instructions to the readme (#132) * Add Pyright instructions to the readme * added note about libraries with no stubs --------- Co-authored-by: andrewj-brown <92134285+andrewj-brown@users.noreply.github.com> --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 2a85e31..1785a2c 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,26 @@ We use an automated code formatter called [Black](https://black.readthedocs.io/) poetry run black uqcsbot ``` +Individual files can also be styled with: + +```bash +poetry run pyright uqcsbot/file.py +``` + +## Static Type Checks + +We use [Pyright](https://github.com/microsoft/pyright) to perform static type checks; which all commits should pass. The exception list within `pyproject.toml` is only to be used for legacy code or libraries with no available typing stubs. We hope that all new cogs can be made to pass - if you're having trouble, ping us on discord and we'll give you a hand. To run Pyright, run from the root of the repo: + +```bash +poetry run pyright uqcsbot +``` + +Individual files can also be typechecked with: + +```bash +poetry run pyright uqcsbot/file.py +``` + ## Development Resources If this is your first time working on an open source project, we're here to walk you through every step of the way.