Georg Brandl committed fb455d8

Rename attribute to better fit the purpose.

Comments (0)

Files changed (1)


 dummy_reporter = Reporter('', 4, 4)
-versioning_methods = {
+versioning_conditions = {
     'none': False,
     'text': nodes.TextElement,
     'commentable': is_commentable,
         self.config = config
         # the method of doctree versioning; see set_versioning_method
-        self.versioning_method = None
+        self.versioning_condition = None
         # the application object; only set while update() runs = None
         raise an exception if the user tries to use an environment with an
         incompatible versioning method.
-        if method not in versioning_methods:
+        if method not in versioning_conditions:
             raise ValueError('invalid versioning method: %r' % method)
-        method = versioning_methods[method]
-        if self.versioning_method not in (None, method):
+        condition = versioning_conditions[method]
+        if self.versioning_condition not in (None, condition):
             raise SphinxError('This environment is incompatible with the '
                               'selected builder, please choose another '
                               'doctree directory.')
-        self.versioning_method = method
+        self.versioning_condition = condition
     def warn(self, docname, msg, lineno=None):
         # strange argument order is due to backwards compatibility
         # store time of build, for outdated files detection
         self.all_docs[docname] = time.time()
-        if self.versioning_method:
+        if self.versioning_condition:
             # get old doctree
                 f = open(self.doc2path(docname,
             # add uids for versioning
             if old_doctree is None:
-                list(add_uids(doctree, nodes.TextElement))
+                list(add_uids(doctree, self.versioning_condition))
-                    old_doctree, doctree, self.versioning_method))
+                    old_doctree, doctree, self.versioning_condition))
         # make it picklable
         doctree.reporter = None
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.