Browse Source

Upgrade Python version to 3.8

The "noqa" comments intended for getting the mccabe tool to ignore a
method's complexity needed to be moved as part of this, for some reason.
merge-requests/88/head
Deimos 5 years ago
parent
commit
d2605215ca
  1. 2
      salt/salt/common.jinja2
  2. 4
      tildes/tildes/models/topic/topic.py
  3. 4
      tildes/tildes/views/topic.py

2
salt/salt/common.jinja2

@ -1,4 +1,4 @@
{% set python_version = '3.7' %}
{% set python_version = '3.8' %}
{% set app_dir = '/opt/tildes' %}
{% set static_sites_dir = '/opt/tildes-static-sites' %}

4
tildes/tildes/models/topic/topic.py

@ -441,8 +441,8 @@ class Topic(DatabaseModel):
return False
@property # noqa
def content_type(self) -> Optional[TopicContentType]:
@property
def content_type(self) -> Optional[TopicContentType]: # noqa
"""Return the content's type based on the topic's attributes."""
if self.is_text_type:
if self.has_tag("ask.survey"):

4
tildes/tildes/views/topic.py

@ -140,10 +140,10 @@ def post_group_topics(
raise HTTPFound(location=new_topic.permalink)
@view_config(route_name="home", renderer="home.jinja2") # noqa
@view_config(route_name="home", renderer="home.jinja2")
@view_config(route_name="group", renderer="topic_listing.jinja2")
@use_kwargs(TopicListingSchema())
def get_group_topics(
def get_group_topics( # noqa
request: Request,
after: Optional[str],
before: Optional[str],

Loading…
Cancel
Save