Commits

Ian Cordasco committed c49c60d

A couple more __str__ methods.

I don't see anywhere else where they might be useful. Pull Requests always
accepted for other places of course.

Comments (0)

Files changed (1)

github3/issues.py

         self.name = label.get('name')
 
     def __repr__(self):
-        return '<Label [{0}]>'.format(self.name)
+        return '<Label [{0}]>'.format(self)
+
+    def __str__(self):
+        return self.name
 
     def _update_(self, label):
         self.__init__(label, self._session)
             self.due_on = self._strptime(mile.get('due_on'))
 
     def __repr__(self):
-        return '<Milestone [{0}]>'.format(self.title)
+        return '<Milestone [{0}]>'.format(self)
+
+    def __str__(self):
+        return self.title
 
     def _update_(self, mile):
         self.__init__(mile, self._session)
 
     def __repr__(self):
         return '<Issue [{r[0]}/{r[1]} #{n}]>'.format(r=self.repository,
-                n=self.number)  # nopep8
+                                                     n=self.number)
 
     def _update_(self, issue):
         self.__init__(issue, self._session)
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 ProjectModifiedEvent.java.
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.