From ac17525039b127e8712c402d0b09ffa864c37ef5 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 26 Nov 2013 14:31:52 -0600 Subject: [PATCH] Replace use of dict.has_key with `key in dict` --- docs/_ext/djangodocs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py index 6a9659171d..8946eb063b 100644 --- a/docs/_ext/djangodocs.py +++ b/docs/_ext/djangodocs.py @@ -99,11 +99,11 @@ def visit_snippet(self, node): linenos = node.rawsource.count('\n') >= self.highlightlinenothreshold - 1 fname = node['filename'] highlight_args = node.get('highlight_args', {}) - if node.has_key('language'): + if 'language' in node: # code-block directives lang = node['language'] highlight_args['force'] = True - if node.has_key('linenos'): + if 'linenos' in node: linenos = node['linenos'] def warner(msg):