Created
December 3, 2015 08:27
-
-
Save itsmemattchung/baab6b7351a7ee492392 to your computer and use it in GitHub Desktop.
License __dict__ update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
github3.licenses | |
================ | |
This module contains the classes relating to licenses | |
See also: https://developer.github.com/v3/licenses/ | |
""" | |
from __future__ import unicode_literals | |
from .models import GitHubCore | |
class License(GitHubCore): | |
CUSTOM_HEADERS = { | |
'Accept': 'application/vnd.github.drax-preview+json' | |
} | |
def _update_attributes(self, license): | |
self.__dict__.update(license) | |
def _repr(self): | |
return '<License [{0}]>'.format(self.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment