Skip to content

Commit

Permalink
replace whitelist with allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
voidlily committed Apr 25, 2024
1 parent cfd96f4 commit a50b820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/engineering/languages-runtimes/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ The Python ecosystem is large and full of alternative solutions to similar probl
## Type support
Python 3.5 and beyond have had partial support for static type hints. Static typing can both make code authors' intent clearer and reduce the number of bugs through static analysis. It's also notorious for slowing down the pace of prototyping and requiring a great deal of boiler-plate.

Given this state, we believe it's reasonable to **default** to using type annotations when they make your intent clearer (i.e. as a form of documentation). We **suggest** using a static analysis tool (such as [mypy](http://mypy.readthedocs.io/en/latest/)) to catch logic bugs, but only where it's practical. Consider a white-list of files to run against.
Given this state, we believe it's reasonable to **default** to using type annotations when they make your intent clearer (i.e. as a form of documentation). We **suggest** using a static analysis tool (such as [mypy](http://mypy.readthedocs.io/en/latest/)) to catch logic bugs, but only where it's practical. Consider an allowlist of files to run against.

[Django]: https://www.djangoproject.com/

0 comments on commit a50b820

Please sign in to comment.