diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 994698cca..4e7952399 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -211,7 +211,9 @@ Some further tips for good type hints: positions, in favor of covariant types like `Mapping` or `Sequence`; * avoid Union return types: https://github.com/python/mypy/issues/1693; * in Python 2, whenever possible, use `unicode` if that's the only - possible type, and `Text` if it can be either `unicode` or `bytes`. + possible type, and `Text` if it can be either `unicode` or `bytes`; +* use platform checks like `if sys.platform == 'win32'` to denote + platform-dependent APIs. Imports in stubs are considered private (not part of the exported API) unless: