diff --git a/05-Create-Open-Doors-Tables.py b/05-Create-Open-Doors-Tables.py index de2dd16..d0303de 100755 --- a/05-Create-Open-Doors-Tables.py +++ b/05-Create-Open-Doors-Tables.py @@ -128,7 +128,7 @@ def main(args, log): final.story_to_final_without_tags(bookmark, bookmark_authors, False) ) if final_bookmarks: - final.insert_into_final("story_links", final_bookmarks) # noqa: E701 + final.insert_into_final("story_links", final_bookmarks) # AUTHORS log.info( diff --git a/shared_python/FinalTables.py b/shared_python/FinalTables.py index 3d9b0e6..665d4c7 100755 --- a/shared_python/FinalTables.py +++ b/shared_python/FinalTables.py @@ -36,9 +36,9 @@ def _escape_unescape(self, item): def _value(self, row): value = [] for item in row: - if type(item) is str: # noqa: E721 + if isinstance(item, str): value.append('"' + self._escape_unescape(item) + '"') - elif type(item) is datetime.datetime: + elif isinstance(item, datetime.datetime): value.append('"' + str(item) + '"') elif item is None: value.append("null") diff --git a/shared_python/Tags.py b/shared_python/Tags.py index beacab0..e69068f 100755 --- a/shared_python/Tags.py +++ b/shared_python/Tags.py @@ -90,8 +90,8 @@ def populate_tag_table( if story_tags_row[col] is not None: for val in re.split(r", ?", story_tags_row[col]): if val != "": - if ( - type(tag_col_lookup[col]) is str # noqa: E721 + if isinstance( + tag_col_lookup[col], str ): # Probably AA or a custom archive cleaned_tag = ( val.encode("utf-8").replace("'", "'").strip()