Skip to content

Commit

Permalink
Make prospector happy
Browse files Browse the repository at this point in the history
Also, use flynt to detect string formatting issues.
  • Loading branch information
schneiderfelipe committed May 2, 2022
1 parent 6b6dc92 commit 0ea259c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
30 changes: 29 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ types-dateparser = "^1.1.0"
types-requests = "^2.27.16"
types-Markdown = "^3.3.12"
prospector = "^1.7.7"
flynt = "^0.76"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
12 changes: 6 additions & 6 deletions scripts/update-seminars.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ def _normalize_key(key):

if attrs and contents:
return f"<{tag_name} {attrs}>{contents}</{tag_name}>"
elif attrs:
if attrs:
return f"<{tag_name} {attrs} />"
elif contents:
if contents:
return f"<{tag_name}>{contents}</{tag_name}>"
else:
return f"<{tag_name} />"
return f"<{tag_name} />"

return _tag

Expand Down Expand Up @@ -128,6 +127,7 @@ def _speaker_avatar_to_markdown(self):
),
href=self.speaker_url,
)
return None

def _description_to_markdown(self):
return markdown(self.description)
Expand Down Expand Up @@ -191,8 +191,8 @@ def __post_init__(self):
calendar.HTMLCalendar()
.formatmonth(datetime.today().year, datetime.today().month)
.replace(
">%i<" % datetime.today().day,
' bgcolor="#66ff66"><b><u>%i</u></b><' % datetime.today().day,
f">{int(datetime.today().day)}<",
f' bgcolor="#66ff66"><b><u>{int(datetime.today().day)}</u></b><',
)
)

Expand Down

0 comments on commit 0ea259c

Please sign in to comment.