scripts/github_stats.py
def get_languages(self, repo, temp_repo):
        """
        Retrieves the languages used in the repo and increments the respective
        counts of those languages. Only increments languages that have names.
        Anything else is not incremented (i.e. numbers).
        """
        try:
            self.languages[repo.language] += 1
        except KeyError:
            count = self.languages[repo.language] = 1
        for repo_languages in repo.iter_languages():
            self.languages_json[repo.name][repo_languages[0]] = repo_languages[1]
            for language in repo_languages:
                if isinstance(language, basestring):#is language
                    temp_repo.languages.append(language)
                    self.previous_language = language
                else:#record size bytes of language
                    try:
                        self.languages_size[self.previous_language] += \
                            language
                    except KeyError:
                        size = self.languages_size[self.previous_language] \
                            = language
def get_languages(self, repo, temp_repo):
        """
        Retrieves the languages used in the repo and increments the respective
        counts of those languages. Only increments languages that have names.
        Anything else is not incremented (i.e. numbers).
        """
        try:
            self.languages[repo.language] += 1
        except KeyError:
            count = self.languages[repo.language] = 1
        for repo_languages in repo.iter_languages():
            self.languages_json[repo.name][repo_languages[0]] = repo_languages[1]
            for language in repo_languages:
                if isinstance(language, basestring):#is language
                    temp_repo.languages.append(language)
                    self.previous_language = language
                else:#record size bytes of language
                    try:
                        self.languages_size[self.previous_language] += \
                            language
                    except KeyError:
                        size = self.languages_size[self.previous_language] \
                            = language
def get_languages ( self , repo , temp_repo ) : try : self . languages [ repo . language ] += 1 except KeyError : count = self . languages [ repo . language ] = 1 for repo_languages in repo . iter_languages ( ) : self . languages_json [ repo . name ] [ repo_languages [ 0 ] ] = repo_languages [ 1 ] for language in repo_languages : if isinstance ( language , basestring ) : #is language temp_repo . languages . append ( language ) self . previous_language = language else : #record size bytes of language try : self . languages_size [ self . previous_language ] += language except KeyError : size = self . languages_size [ self . previous_language ] = language
Retrieves the languages used in the repo and increments the respective
        counts of those languages. Only increments languages that have names.
        Anything else is not incremented (i.e. numbers).
Retrieves the languages used in the repo and increments the respective counts of those languages . Only increments languages that have names . Anything else is not incremented ( i . e . numbers ) .