Rename authors -> _authors in VCSBackend.authors() loop to avoid clobber.
[update-copyright.git] / update_copyright / vcs / __init__.py
index 467c23bf2a9f9b51a35b50255c4d5da844e48029..17281ab34886b293db1d4cacc54c24cd40568b36 100644 (file)
@@ -43,7 +43,7 @@ class VCSBackend (object):
         if filename is None:
             years.update(self._year_hacks.values())
         elif _utils.splitpath(filename) in self._year_hacks:
-            years.update(year_hacks[_utils.splitpath(filename)])
+            years.add(self._year_hacks[_utils.splitpath(filename)])
         years = sorted(years)
         return years[0]
 
@@ -53,12 +53,12 @@ class VCSBackend (object):
     def authors(self, filename=None, with_emails=True):
         authors = self._authors(filename=filename)
         if filename is None:
-            for path,authors in self._author_hacks.items():
-                authors.update(authors)
+            for path,_authors in self._author_hacks.items():
+                authors.update(_authors)
         elif _utils.splitpath(filename) in self._author_hacks:
             authors.update(self._author_hacks[_utils.splitpath(filename)])
         return _utils.replace_aliases(
-            authors, with_email=False, aliases=self._aliases)
+            authors, with_email=with_emails, aliases=self._aliases)
 
     def is_versioned(self, filename=None):
         raise NotImplementedError()