2727
2828
2929def string_to_datetime (string ):
30- """Convert a string to Python datetime
30+ """Convert a string to Python datetime.
3131
3232 :param str github_date: date string to parse
3333
@@ -39,7 +39,7 @@ def string_to_datetime(string):
3939
4040
4141def _handle_naive_datetimes (f ):
42- """Decorator to make datetime arguments use GitHub timezone
42+ """Decorator to make datetime arguments use GitHub timezone.
4343
4444 :param func f: Function to wrap
4545
@@ -61,7 +61,7 @@ def wrapper(datetime_):
6161
6262@_handle_naive_datetimes
6363def datetime_to_ghdate (datetime_ ):
64- """Convert Python datetime to GitHub date string
64+ """Convert Python datetime to Github date string.
6565
6666 :param datetime datetime_: datetime object to convert
6767
@@ -71,7 +71,7 @@ def datetime_to_ghdate(datetime_):
7171
7272@_handle_naive_datetimes
7373def datetime_to_commitdate (datetime_ ):
74- """Convert Python datetime to GitHub date string
74+ """Convert Python datetime to Github date string.
7575
7676 :param datetime datetime_: datetime object to convert
7777
@@ -84,12 +84,11 @@ def datetime_to_commitdate(datetime_):
8484
8585
8686def datetime_to_isodate (datetime_ ):
87- """Convert Python datetime to GitHub date string
88-
89- .. note:: Supports naive and timezone-aware datetimes
87+ """Convert Python datetime to Github date string.
9088
9189 :param str datetime_: datetime object to convert
9290
91+ .. note:: Supports naive and timezone-aware datetimes
9392 """
9493 if not datetime_ .tzinfo :
9594 datetime_ = datetime_ .replace (tzinfo = tz .tzutc ())
@@ -104,7 +103,7 @@ class AuthError(Exception):
104103
105104
106105def requires_auth (f ):
107- """Decorate to check a function call for authentication
106+ """Decorate to check a function call for authentication.
108107
109108 Sets a ``requires_auth`` attribute on functions, for use in introspection.
110109
@@ -129,7 +128,7 @@ def wrapper(self, *args, **kwargs):
129128
130129
131130def enhanced_by_auth (f ):
132- """Decorator to mark a function as enhanced by authentication
131+ """Decorator to mark a function as enhanced by authentication.
133132
134133 Sets a ``enhanced_by_auth`` attribute on functions, for use in
135134 introspection.
@@ -145,15 +144,15 @@ def enhanced_by_auth(f):
145144class GithubCommand (object ):
146145
147146 def __init__ (self , request ):
148- """Main API binding interface
147+ """Main API binding interface.
149148
150149 :param github2.request.GithubRequest request: HTTP request handler
151150
152151 """
153152 self .request = request
154153
155154 def make_request (self , command , * args , ** kwargs ):
156- """Make an API request
155+ """Make an API request.
157156
158157 Various options are supported if they exist in ``kwargs``:
159158
@@ -187,7 +186,7 @@ def make_request(self, command, *args, **kwargs):
187186 return response
188187
189188 def get_value (self , * args , ** kwargs ):
190- """Process a single-value response from the API
189+ """Process a single-value response from the API.
191190
192191 If a ``datatype`` parameter is given it defines the
193192 :class:`BaseData`-derived class we should build from the provided data
@@ -207,7 +206,7 @@ def get_value(self, *args, **kwargs):
207206 return value
208207
209208 def get_values (self , * args , ** kwargs ):
210- """Process a multi-value response from the API
209+ """Process a multi-value response from the API.
211210
212211 :see: :meth:`get_value`
213212
@@ -228,7 +227,7 @@ def get_values(self, *args, **kwargs):
228227
229228
230229def doc_generator (docstring , attributes ):
231- """Utility function to augment BaseDataType docstring
230+ """Utility function to augment BaseDataType docstring.
232231
233232 :param str docstring: docstring to augment
234233 :param dict attributes: attributes to add to docstring
@@ -246,7 +245,7 @@ def bullet(title, text):
246245
247246class Attribute (object ):
248247 def __init__ (self , help ):
249- """Generic object attribute for use with :class:`BaseData`
248+ """Generic object attribute for use with :class:`BaseData`.
250249
251250 :param str help: Attribute description
252251
@@ -269,7 +268,7 @@ class DateAttribute(Attribute):
269268 }
270269
271270 def __init__ (self , * args , ** kwargs ):
272- """Date handling attribute for use with :class:`BaseData`
271+ """Date handling attribute for use with :class:`BaseData`.
273272
274273 :param str format: The date format to support, see
275274 :data:`convertor_for_format` for supported options
@@ -327,7 +326,8 @@ def iterate(self):
327326# Ugly base class definition for Python 2 and 3 compatibility, where metaclass
328327# syntax is incompatible
329328class BaseData (BaseDataType ('BaseData' , (object , ), {})):
330- """Wrapper for API responses
329+
330+ """Wrapper for API responses.
331331
332332 .. warning::
333333 Supports subscript attribute access purely for backwards compatibility,
@@ -336,7 +336,7 @@ class BaseData(BaseDataType('BaseData', (object, ), {})):
336336 """
337337
338338 def __getitem__ (self , key ):
339- """Access objects's attribute using subscript notation
339+ """Access objects's attribute using subscript notation.
340340
341341 This is here purely to maintain compatibility when switching ``dict``
342342 responses to ``BaseData`` derived objects.
@@ -350,7 +350,7 @@ def __getitem__(self, key):
350350 return getattr (self , key )
351351
352352 def __setitem__ (self , key , value ):
353- """Update object's attribute using subscript notation
353+ """Update object's attribute using subscript notation.
354354
355355 :see: :meth:`BaseData.__getitem__`
356356
@@ -364,7 +364,7 @@ def __setitem__(self, key, value):
364364
365365
366366def repr_string (string ):
367- """Shorten string for use in repr() output
367+ """Shorten string for use in repr() output.
368368
369369 :param str string: string to operate on
370370 :return: string, with maximum length of 20 characters
0 commit comments