From 32b39efa427cfe0a03f1500ed3861306bc4f9d72 Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Wed, 27 Oct 2021 11:54:19 +0100 Subject: [PATCH 1/2] Suggest type hinting. --- docs/src/developers_guide/contributing_code_formatting.rst | 7 +++++++ docs/src/whatsnew/latest.rst | 3 +++ 2 files changed, 10 insertions(+) diff --git a/docs/src/developers_guide/contributing_code_formatting.rst b/docs/src/developers_guide/contributing_code_formatting.rst index 6d48882652..9d099d771d 100644 --- a/docs/src/developers_guide/contributing_code_formatting.rst +++ b/docs/src/developers_guide/contributing_code_formatting.rst @@ -57,5 +57,12 @@ will look similar to:: .. note:: You can also run `black`_ and `flake8`_ manually. Please see the their officially documentation for more information. +Type Hinting +------------ +Iris is gradually adding +`type hints `_ into the +codebase. Where possible please include/add type hints in code that you are +working on. + .. _pre-commit: https://pre-commit.com/ diff --git a/docs/src/whatsnew/latest.rst b/docs/src/whatsnew/latest.rst index c898734de9..b1b4b40524 100644 --- a/docs/src/whatsnew/latest.rst +++ b/docs/src/whatsnew/latest.rst @@ -146,6 +146,9 @@ This document explains the changes made to Iris for this release #. `@trexfeathers`_ added more detail on making `iris-test-data`_ available during :ref:`developer_running_tests`. (:pull:`4359`) +#. `@trexfeathers`_ encouraged contributors to include type hinting in code + they are working on - :ref:`code_formatting`. (:pull:`4390`) + 💼 Internal =========== From 1212d263be1002f7b66e816220c8c9ecf7f907be Mon Sep 17 00:00:00 2001 From: Martin Yeo Date: Wed, 17 Nov 2021 15:21:51 +0000 Subject: [PATCH 2/2] More forgiving language. --- docs/src/developers_guide/contributing_code_formatting.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/developers_guide/contributing_code_formatting.rst b/docs/src/developers_guide/contributing_code_formatting.rst index 9d099d771d..bb3140e4f9 100644 --- a/docs/src/developers_guide/contributing_code_formatting.rst +++ b/docs/src/developers_guide/contributing_code_formatting.rst @@ -61,8 +61,9 @@ Type Hinting ------------ Iris is gradually adding `type hints `_ into the -codebase. Where possible please include/add type hints in code that you are -working on. +codebase. The reviewer will look for type hints in a pull request; if you're +not confident with these, feel free to work together with the reviewer to +add/improve them. .. _pre-commit: https://pre-commit.com/