<commit_before>from __future__ import unicode_literals

try:
    from django.urls import include, path, re_path as url
except ImportError:
    from django.conf.urls import include, url

from .views import EpisodeDetailView, EpisodeDownloadView, ShowDetailView, ShowFeedView, ShowListView
from . import settings


app_name = 'podcast'

singular = [
    url(r'^feed/$', ShowFeedView.as_view(), name='show_feed'),
    url(r'^(?P<slug>[\w-]+)/download/$', EpisodeDownloadView.as_view(), name='episode_download'),
    url(r'^(?P<slug>[\w-]+)/$', EpisodeDetailView.as_view(), name='episode_detail'),
    url(r'^$', ShowDetailView.as_view(), name='show_detail'),
]

if settings.PODCAST_SINGULAR:
    urlpatterns = singular
else:
    urlpatterns = [
        url(r'^(?P<show_slug>[\w-]+)/', include(singular)),
        url(r'^$', ShowListView.as_view(), name='show_list'),
    ]<commit_msg>Changed url to re_path for forward compatibility<commit_after>from __future__ import unicode_literals

try:
    from django.urls import include, re_path
except ImportError:
    from django.conf.urls import include, url as re_path

from .views import EpisodeDetailView, EpisodeDownloadView, ShowDetailView, ShowFeedView, ShowListView
from . import settings


app_name = 'podcast'

singular = [
    re_path(r'^feed/$', ShowFeedView.as_view(), name='show_feed'),
    re_path(r'^(?P<slug>[\w-]+)/download/$', EpisodeDownloadView.as_view(), name='episode_download'),
    re_path(r'^(?P<slug>[\w-]+)/$', EpisodeDetailView.as_view(), name='episode_detail'),
    re_path(r'^$', ShowDetailView.as_view(), name='show_detail'),
]

if settings.PODCAST_SINGULAR:
    urlpatterns = singular
else:
    urlpatterns = [
        re_path(r'^(?P<show_slug>[\w-]+)/', include(singular)),
        re_path(r'^$', ShowListView.as_view(), name='show_list'),
    ]
{'fraction_non_alphanumeric': 0.16327652556349642, 'fraction_numerical': 0.0, 'mean_word_length': 5.148648648648648, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6387975', 'n_tokens_mistral': 631, 'n_tokens_neox': 611, 'n_words': 119}