<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf.urls import patterns, url
from django.utils.text import slugify

from shop.views import ShopTemplateView

from shop_catalog.views import (
    ProductListView, ProductDetailView,
    CategoryListView, CategoryDetailView,
    BrandListView, BrandDetailView,
    ManufacturerListView, ManufacturerDetailView,
    ProductVariantsJSONView)
from shop_catalog import settings as scs


def catalog_url(url_string, view, name, extra_url=None):
    """
    Url wrapper function that gets a url attribute from settings
    if it exists and prepends it to the url. If it doesn't exist, the
    given string is used as a base url. It also prefixes the name with
    the string 'catalog_'.
    """
    url_string = getattr(scs, '{}_URL'.format(url_string.upper()), url_string)<commit_msg>Comment typo<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf.urls import patterns, url
from django.utils.text import slugify

from shop.views import ShopTemplateView

from shop_catalog.views import (
    ProductListView, ProductDetailView,
    CategoryListView, CategoryDetailView,
    BrandListView, BrandDetailView,
    ManufacturerListView, ManufacturerDetailView,
    ProductVariantsJSONView)
from shop_catalog import settings as scs


def catalog_url(url_string, view, name, extra_url=None):
    """
    Url wrapper function that gets an url attribute from settings
    if it exists and prepends it to the url. If it doesn't exist, the
    given string is used as a base url. It also prefixes the name with
    the string 'catalog_'.
    """
    url_string = getattr(scs, '{}_URL'.format(url_string.upper()), url_string)
{'fraction_non_alphanumeric': 0.07339449541284404, 'fraction_numerical': 0.0011467889908256881, 'mean_word_length': 4.352760736196319, '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': '2841202', 'n_tokens_mistral': 497, 'n_tokens_neox': 479, 'n_words': 176}