Skip to content

Commit

Permalink
Reformat files according to black
Browse files Browse the repository at this point in the history
  • Loading branch information
hancush committed Feb 9, 2023
1 parent 9e83669 commit cd7e864
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion councilmatic_core/haystack_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class BillIndex(indexes.SearchIndex):

text = indexes.CharField(
document=True,
use_template=True,
Expand Down
10 changes: 0 additions & 10 deletions councilmatic_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def cast_to_datetime(cls, field):


class Person(opencivicdata.core.models.Person):

person = models.OneToOneField(
opencivicdata.core.models.Person,
on_delete=models.CASCADE,
Expand Down Expand Up @@ -154,7 +153,6 @@ def link_html(self):


class Organization(opencivicdata.core.models.Organization, CastToDateTimeMixin):

organization = models.OneToOneField(
opencivicdata.core.models.Organization,
on_delete=models.CASCADE,
Expand Down Expand Up @@ -257,7 +255,6 @@ def link_html(self):
link_fmt = '<a href="{0}">{1}</a>'

if self.classification == "committee":

try:
link_path = reverse(
"{}:committee_detail".format(settings.APP_NAME), args=(self.slug,)
Expand All @@ -268,7 +265,6 @@ def link_html(self):
return link_fmt.format(link_path, self.name)

if self.classification == "legislature":

try:
link_path = reverse("{}:council_members".format(settings.APP_NAME))
except NoReverseMatch:
Expand All @@ -280,7 +276,6 @@ def link_html(self):


class Post(opencivicdata.core.models.Post):

post = models.OneToOneField(
opencivicdata.core.models.Post,
on_delete=models.CASCADE,
Expand Down Expand Up @@ -366,7 +361,6 @@ def get_queryset(self):


class Event(opencivicdata.legislative.models.Event):

event = models.OneToOneField(
opencivicdata.legislative.models.Event,
on_delete=models.CASCADE,
Expand All @@ -384,7 +378,6 @@ def delete(self, **kwargs):

@property
def event_page_url(self):

try:
link = reverse(
"{}:event_detail".format(settings.APP_NAME), args=(self.slug,)
Expand Down Expand Up @@ -451,7 +444,6 @@ def local_start_time(self):


class Bill(opencivicdata.legislative.models.Bill):

bill = models.OneToOneField(
opencivicdata.legislative.models.Bill,
on_delete=models.CASCADE,
Expand Down Expand Up @@ -577,7 +569,6 @@ def pseudo_topics(self):
so that bill listings can still have some useful tags populated
"""
if self.actions.all():

orgs = set(
[
a.organization.name
Expand All @@ -594,7 +585,6 @@ def pseudo_topics(self):
and self.controlling_body
and self.controlling_body[0].name != settings.CITY_COUNCIL_NAME
):

orgs = self.controlling_body

return list(orgs)
Expand Down
6 changes: 0 additions & 6 deletions councilmatic_core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def __init__(self, *args, **kwargs):
super(CouncilmaticSearchForm, self).__init__(*args, **kwargs)

def no_query_found(self):

return self.searchqueryset.all()


Expand Down Expand Up @@ -139,7 +138,6 @@ def city_context(request):


class IndexView(TemplateView):

template_name = "councilmatic_core/index.html"
bill_model = Bill
event_model = Event
Expand Down Expand Up @@ -189,7 +187,6 @@ def map(self):

for post in self.object_list:
if post.shape:

council_member = "Vacant"
detail_link = ""
if post.current_member:
Expand Down Expand Up @@ -258,7 +255,6 @@ def get_context_data(self, **kwargs):

if settings.USING_NOTIFICATIONS:
for bas in user.billactionsubscriptions.all():

if bill == bas.bill:
context["user_subscribed"] = True
break
Expand Down Expand Up @@ -414,7 +410,6 @@ def get_context_data(self, **kwargs):
context["user_subscribed"] = False

if settings.USING_NOTIFICATIONS:

if self.request.user.is_authenticated:
user = self.request.user
context["user"] = user
Expand Down Expand Up @@ -542,7 +537,6 @@ def get_context_data(self, **kwargs):


def flush(request, flush_key):

try:
if flush_key == settings.FLUSH_KEY:
cache.clear()
Expand Down

0 comments on commit cd7e864

Please sign in to comment.