Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2024
1 parent df76a7d commit 5ad944b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
1 change: 1 addition & 0 deletions hasjob/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Hasjob models."""

# flake8: noqa

from __future__ import annotations
Expand Down
20 changes: 11 additions & 9 deletions hasjob/views/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,9 +1013,9 @@ def filter_locations(board, filters):
{
'name': data.get(geonameid, {}).get('name', ''),
'title': data.get(geonameid, {}).get('picker_title', ''),
'available': False
if not filtered_geonameids
else geonameid in filtered_geonameids,
'available': (
False if not filtered_geonameids else geonameid in filtered_geonameids
),
}
for geonameid in geonameids
]
Expand All @@ -1034,9 +1034,9 @@ def format_job_type(job_type):
return {
'name': job_type.name,
'title': job_type.title,
'available': False
if not filtered_typeids
else job_type.id in filtered_typeids,
'available': (
False if not filtered_typeids else job_type.id in filtered_typeids
),
}

if board:
Expand Down Expand Up @@ -1067,9 +1067,11 @@ def format_job_category(job_category):
return {
'name': job_category.name,
'title': job_category.title,
'available': False
if not filtered_categoryids
else job_category.id in filtered_categoryids,
'available': (
False
if not filtered_categoryids
else job_category.id in filtered_categoryids
),
}

if board:
Expand Down
16 changes: 10 additions & 6 deletions hasjob/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,12 +1305,16 @@ def oembed(url):
'static', filename='img/hasjob-logo-200x200.png', _external=True
),
'author_name': board.title if board else app.config['SITE_TITLE'],
'author_url': board.url_for(_external=True)
if board
else url_for('index', subdomain=None, _external=True),
'title': ' | '.join([board.title, board.caption])
if board
else app.config['SITE_TITLE'],
'author_url': (
board.url_for(_external=True)
if board
else url_for('index', subdomain=None, _external=True)
),
'title': (
' | '.join([board.title, board.caption])
if board
else app.config['SITE_TITLE']
),
'html': (
'<iframe id="{iframeid}" src="{url}" '
'width="100%" height="724" frameborder="0" scrolling="no">'.format(
Expand Down
1 change: 0 additions & 1 deletion migrations/versions/05e807853572_switch_to_timestamptz.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"""


# revision identifiers, used by Alembic.
revision = '05e807853572'
down_revision = '625415764254'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"""


# revision identifiers, used by Alembic.
revision = 'a8f1e1c55a57'
down_revision = '05e807853572'
Expand Down

0 comments on commit 5ad944b

Please sign in to comment.