<commit_before>from django.utils.translation import gettext_lazy as _


# Built-in Licenses
class _LicenseBase:
    """Base class for built-in licenses."""

    icons = ''  # CSS classes. See zamboni.css for a list.
    on_form = True
    creative_commons = False
    # slugs should be taken from https://spdx.org/licenses/


class LICENSE_MPL2(_LicenseBase):
    name = _('Mozilla Public License 2.0')
    url = 'http://www.mozilla.org/MPL/2.0/'
    builtin = 1
    slug = 'MPL-2.0'


class LICENSE_GPL2(_LicenseBase):
    name = _('GNU General Public License v2.0')
    url = 'http://www.gnu.org/licenses/gpl-2.0.html'
    builtin = 2
    slug = 'GPL-2.0-or-later'


class LICENSE_GPL3(_LicenseBase):
    name = _('GNU General Public License v3.0')
    url = 'http://www.gnu.org/licenses/gpl-3.0.html'
    builtin = 3
    slug = 'GPL-3.0-or-later'


class LICENSE_LGPL2(_LicenseBase):
    name = _('GNU Library General Public License v2.1')
    url = 'http://www.gnu.org/licenses/lgpl-2.1.html'
    builtin = 4
    slug = 'LGPL-2.1-or-later'


class LICENSE_LGPL3(_LicenseBase):
    name = _('GNU Library General Public License v3.0')
    url = 'http://www.gnu.org/licenses/lgpl-3.0.html'
    builtin = 5
    slug = 'GPL-3.0-or-later'


class LICENSE_MIT(_LicenseBase):
    name = _('The MIT License')
    url = 'http://www.opensource.org/licenses/mit-license.php'
    builtin = 6
    slug = 'MIT'


class LICENSE_BSD(_LicenseBase):
    name = _('The BSD License')
    url = 'http://www.opensource.org/licenses/bsd-license.php'
    builtin = 7
    slug = 'BSD-2-Clause'


# builtin 8, 9 aren't used in any current versions, and aren't available for selection.


class LICENSE_MPL1(_LicenseBase):
    name = _('Mozilla Public License 1.1')
    url = 'http://www.mozilla.org/MPL/MPL-1.1.html'
    builtin = 10
    slug = 'MPL-1.1'
    on_form = False  # obsolete and unavailable for selection


class LICENSE_CC_COPYRIGHT(_LicenseBase):<commit_msg>fix license slug for lgpl 3.0 (#18491)<commit_after>from django.utils.translation import gettext_lazy as _


# Built-in Licenses
class _LicenseBase:
    """Base class for built-in licenses."""

    icons = ''  # CSS classes. See zamboni.css for a list.
    on_form = True
    creative_commons = False
    # slugs should be taken from https://spdx.org/licenses/


class LICENSE_MPL2(_LicenseBase):
    name = _('Mozilla Public License 2.0')
    url = 'http://www.mozilla.org/MPL/2.0/'
    builtin = 1
    slug = 'MPL-2.0'


class LICENSE_GPL2(_LicenseBase):
    name = _('GNU General Public License v2.0')
    url = 'http://www.gnu.org/licenses/gpl-2.0.html'
    builtin = 2
    slug = 'GPL-2.0-or-later'


class LICENSE_GPL3(_LicenseBase):
    name = _('GNU General Public License v3.0')
    url = 'http://www.gnu.org/licenses/gpl-3.0.html'
    builtin = 3
    slug = 'GPL-3.0-or-later'


class LICENSE_LGPL2(_LicenseBase):
    name = _('GNU Library General Public License v2.1')
    url = 'http://www.gnu.org/licenses/lgpl-2.1.html'
    builtin = 4
    slug = 'LGPL-2.1-or-later'


class LICENSE_LGPL3(_LicenseBase):
    name = _('GNU Library General Public License v3.0')
    url = 'http://www.gnu.org/licenses/lgpl-3.0.html'
    builtin = 5
    slug = 'LGPL-3.0-or-later'


class LICENSE_MIT(_LicenseBase):
    name = _('The MIT License')
    url = 'http://www.opensource.org/licenses/mit-license.php'
    builtin = 6
    slug = 'MIT'


class LICENSE_BSD(_LicenseBase):
    name = _('The BSD License')
    url = 'http://www.opensource.org/licenses/bsd-license.php'
    builtin = 7
    slug = 'BSD-2-Clause'


# builtin 8, 9 aren't used in any current versions, and aren't available for selection.


class LICENSE_MPL1(_LicenseBase):
    name = _('Mozilla Public License 1.1')
    url = 'http://www.mozilla.org/MPL/MPL-1.1.html'
    builtin = 10
    slug = 'MPL-1.1'
    on_form = False  # obsolete and unavailable for selection


class LICENSE_CC_COPYRIGHT(_LicenseBase):
{'fraction_non_alphanumeric': 0.13768485466598673, 'fraction_numerical': 0.029321774604793474, 'mean_word_length': 2.9466800804828974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 16, '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': '4533719', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1393, 'n_words': 331}