<commit_before>from __future__ import absolute_import


class FantasySport(object):
    """FantasySport Class
    """

    url = 'http://fantasysports.yahooapis.com/fantasy/v2/'

    def __init__(self, oauth, resource=None):
        """Initialize a FantasySport object
        """
        self.oauth = oauth


    def __repr__(self,):
        return ""

    def _get(self, uri):
        """
        """
        if not self.oauth.token_is_valid():
            self.oauth.refresh_access_token

        response = self.oauth.session.get(uri)

        return response

    def get_game_info(self, game):
        """Return game info
        >>> yfs.get_game_info('mlb')
        """
        uri = 'games;games_keys={0}'.format(game)

        response = self._get(uri)

        return response

    def get_league(self, league_keys):
        """Return league data
        >>> yfs.get_league(['league_key'])
        """     
        uri = 'leagues;league_keys={0}'.format(league_keys)

        response = self._get(uri)

        return response
<commit_msg>checking if base url or not<commit_after>from __future__ import absolute_import


class FantasySport(object):
    """FantasySport Class
    """

    url = 'http://fantasysports.yahooapis.com/fantasy/v2/'

    def __init__(self, oauth, resource=None):
        """Initialize a FantasySport object
        """
        self.oauth = oauth


    def __repr__(self,):
        return ""

    def _get(self, uri):
        """
        """

        if not self.oauth.oauth.base_url :
            self.oauth.oauth.base_url = self.url

        if not self.oauth.token_is_valid():
            self.oauth.refresh_access_token

        response = self.oauth.session.get(uri)

        return response

    def _post(self, uri, data={}):
        """
        """
        pass

    def get_game_info(self, game):
        """Return game info
        >>> yfs.get_game_info('mlb')
        """
        uri = 'games;games_keys={0}'.format(game)

        response = self._get(uri)

        return response

    def get_league(self, league_keys):
        """Return league data
        >>> yfs.get_league(['league_key'])
        """     
        uri = 'leagues;league_keys={0}'.format(league_keys)

        response = self._get(uri)

        return response

{'fraction_non_alphanumeric': 0.12593242650285214, 'fraction_numerical': 0.0026327336551118913, 'mean_word_length': 2.097826086956522, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2208840', 'n_tokens_mistral': 746, 'n_tokens_neox': 685, 'n_words': 135}