diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-27 14:43:38 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-02-27 14:43:38 -0700 |
commit | 046d0575d0c052c9012221f36c3a2d0ccf34abb5 (patch) | |
tree | 6561a2d3e681d22ed7bb007f7ade63cc5c02a27e | |
parent | 208072f817ac14f041569f0123d3434bc9e0daba (diff) | |
download | numpy-046d0575d0c052c9012221f36c3a2d0ccf34abb5.tar.gz |
2to3: Remove `has_key` use that was missed.
The files not in the numpy/ directory were missed. This gets them
all (I hope).
-rw-r--r-- | doc/sphinxext/docscrape.py | 4 | ||||
-rw-r--r-- | doc/sphinxext/plot_directive.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/sphinxext/docscrape.py b/doc/sphinxext/docscrape.py index bbd3fcacc..9aa2cbaff 100644 --- a/doc/sphinxext/docscrape.py +++ b/doc/sphinxext/docscrape.py @@ -113,7 +113,7 @@ class NumpyDocString(object): return self._parsed_data[key] def __setitem__(self,key,val): - if not self._parsed_data.has_key(key): + if not key in self._parsed_data: warn("Unknown section %s" % key) else: self._parsed_data[key] = val @@ -450,7 +450,7 @@ class FunctionDoc(NumpyDocString): 'meth': 'method'} if self._role: - if not roles.has_key(self._role): + if not self._role in roles: print "Warning: invalid role %s" % self._role out += '.. %s:: %s\n \n\n' % (roles.get(self._role,''), func_name) diff --git a/doc/sphinxext/plot_directive.py b/doc/sphinxext/plot_directive.py index 80801e798..060459acc 100644 --- a/doc/sphinxext/plot_directive.py +++ b/doc/sphinxext/plot_directive.py @@ -36,7 +36,7 @@ The ``plot`` directive supports the options include-source : bool Whether to display the source code. Default can be changed in conf.py - + and the ``image`` directive options ``alt``, ``height``, ``width``, ``scale``, ``align``, ``class``. @@ -257,7 +257,7 @@ def run(arguments, content, options, state_machine, state, lineno): # is it in doctest format? is_doctest = contains_doctest(code) - if options.has_key('format'): + if 'format' in options: if options['format'] == 'python': is_doctest = False else: |