<commit_before># Copyright (C) 2017 Forest and Biomass Romania
# Copyright (C) 2020 Terrabit
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import os

from odoo import SUPERUSER_ID, api, tools


def post_init_hook(cr, registry):

    path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")

    files = ["res.country.zone.csv", "res.country.state.csv", "res.country.commune.csv"]
    for file in files:
        with tools.file_open(path + "/" + file, mode="rb") as fp:
            tools.convert_csv_import(
                cr,
                "base",
                file,
                fp.read(),
                {},
                mode="init",
                noupdate=True,
            )
    with api.Environment.manage():
        env = api.Environment(cr, SUPERUSER_ID, {})
        env["res.partner"]._install_l10n_ro_siruta()<commit_msg>Fix pre-commit.<commit_after># Copyright (C) 2017 Forest and Biomass Romania
# Copyright (C) 2020 Terrabit
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import os

from odoo import SUPERUSER_ID, api, tools


def post_init_hook(cr, registry):

    path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")

    files = ["res.country.zone.csv", "res.country.state.csv", "res.country.commune.csv"]
    for file in files:
        with tools.file_open(path + "/" + file, mode="rb") as fp:
            tools.convert_csv_import(
                cr, "base", file, fp.read(), {}, mode="init", noupdate=True,
            )
    with api.Environment.manage():
        env = api.Environment(cr, SUPERUSER_ID, {})
        env["res.partner"]._install_l10n_ro_siruta()
{'fraction_non_alphanumeric': 0.14575866188769415, 'fraction_numerical': 0.014336917562724014, 'mean_word_length': 2.51890756302521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5684324', 'n_tokens_mistral': 590, 'n_tokens_neox': 549, 'n_words': 116}