Skip to content

Instantly share code, notes, and snippets.

@itsmemattchung
Created December 3, 2015 08:27
Show Gist options
  • Save itsmemattchung/baab6b7351a7ee492392 to your computer and use it in GitHub Desktop.
Save itsmemattchung/baab6b7351a7ee492392 to your computer and use it in GitHub Desktop.
License __dict__ update
# -*- 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