<commit_before>import MySQLdb

from airflow.hooks.dbapi_hook import DbApiHook


class MySqlHook(DbApiHook):
    '''
    Interact with MySQL.
    '''

    conn_name_attr = 'mysql_conn_id'
    default_conn_name = 'mysql_default'
    supports_autocommit = True

    def get_conn(self):
        """
        Returns a mysql connection object
        """
        conn = self.get_connection(self.mysql_conn_id)
        port = conn.port or '3306'
        conn = MySQLdb.connect(
            host=conn.host,<commit_msg>Port should be an int<commit_after>import MySQLdb

from airflow.hooks.dbapi_hook import DbApiHook


class MySqlHook(DbApiHook):
    '''
    Interact with MySQL.
    '''

    conn_name_attr = 'mysql_conn_id'
    default_conn_name = 'mysql_default'
    supports_autocommit = True

    def get_conn(self):
        """
        Returns a mysql connection object
        """
        conn = self.get_connection(self.mysql_conn_id)
        if not conn.port:
            port = 3306
        else:
            port = int(conn.port)
        conn = MySQLdb.connect(
            host=conn.host,
{'fraction_non_alphanumeric': 0.08799266727772685, 'fraction_numerical': 0.007332722273143905, 'mean_word_length': 2.3191489361702127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5187252', 'n_tokens_mistral': 354, 'n_tokens_neox': 338, 'n_words': 73}