chore: refurish python code by applying Pylint linter rules (#8322)
This commit is contained in:
parent
1ab81b4972
commit
a1104ab97e
126 changed files with 253 additions and 272 deletions
|
|
@ -158,7 +158,7 @@ class NotionOAuth(OAuthDataSource):
|
|||
page_icon = page_result["icon"]
|
||||
if page_icon:
|
||||
icon_type = page_icon["type"]
|
||||
if icon_type == "external" or icon_type == "file":
|
||||
if icon_type in {"external", "file"}:
|
||||
url = page_icon[icon_type]["url"]
|
||||
icon = {"type": "url", "url": url if url.startswith("http") else f"https://www.notion.so{url}"}
|
||||
else:
|
||||
|
|
@ -191,7 +191,7 @@ class NotionOAuth(OAuthDataSource):
|
|||
page_icon = database_result["icon"]
|
||||
if page_icon:
|
||||
icon_type = page_icon["type"]
|
||||
if icon_type == "external" or icon_type == "file":
|
||||
if icon_type in {"external", "file"}:
|
||||
url = page_icon[icon_type]["url"]
|
||||
icon = {"type": "url", "url": url if url.startswith("http") else f"https://www.notion.so{url}"}
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue