diff options
author | Victor Stinner <vstinner@python.org> | 2020-08-11 13:26:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 13:26:59 (GMT) |
commit | fabd7bb8e0450f16ed5c5c0ad575aa413d65712d (patch) | |
tree | 697881ab8dd38a990ebd68a018a20f08c2ab3c67 /Tools/clinic | |
parent | 1d541c25c8019f7a0b80b3e1b437abe171e40b65 (diff) | |
download | cpython-fabd7bb8e0450f16ed5c5c0ad575aa413d65712d.zip cpython-fabd7bb8e0450f16ed5c5c0ad575aa413d65712d.tar.gz cpython-fabd7bb8e0450f16ed5c5c0ad575aa413d65712d.tar.bz2 |
bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)
Automerge-Triggered-By: @tiran
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 92334d9..1bbbd4f 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -4433,7 +4433,7 @@ class DSLParser: if 'c_default' not in kwargs: # we can only represent very simple data values in C. - # detect whether default is okay, via a blacklist + # detect whether default is okay, via a denylist # of disallowed ast nodes. class DetectBadNodes(ast.NodeVisitor): bad = False @@ -4456,9 +4456,9 @@ class DSLParser: # "starred": "a = [1, 2, 3]; *a" visit_Starred = bad_node - blacklist = DetectBadNodes() - blacklist.visit(module) - bad = blacklist.bad + denylist = DetectBadNodes() + denylist.visit(module) + bad = denylist.bad else: # if they specify a c_default, we can be more lenient about the default value. # but at least make an attempt at ensuring it's a valid expression. |