Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace use of dict.has_key with `key in dict`

  • Loading branch information...
commit ac17525039b127e8712c402d0b09ffa864c37ef5 1 parent bb5ab90
Alex Gaynor alex authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/_ext/djangodocs.py
4 docs/_ext/djangodocs.py
View
@@ -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):
Please sign in to comment.
Something went wrong with that request. Please try again.