chore: fix pyright errors to make pipeline green
This commit is contained in:
parent
73268a8039
commit
eaf7fe9b2a
8 changed files with 15 additions and 15 deletions
|
|
@ -50,7 +50,7 @@ def new() -> None:
|
|||
|
||||
content = "# "
|
||||
with open(prelimary_path, "w") as file:
|
||||
file.write(content)
|
||||
_ = file.write(content)
|
||||
|
||||
click.edit(None, filename=prelimary_path)
|
||||
|
||||
|
|
@ -59,11 +59,11 @@ def new() -> None:
|
|||
parsed_content = parse_markdown_file(prelimary_path, content)
|
||||
|
||||
final_file_name = f"{timestamp}.md"
|
||||
if len(markers := parsed_content.shard.markers):
|
||||
if parsed_content.shard is not None and len(markers := parsed_content.shard.markers):
|
||||
final_file_name = f"{timestamp} {' '.join(markers)}.md"
|
||||
|
||||
final_path = os.path.join(streamer_directory, final_file_name)
|
||||
move(prelimary_path, final_path)
|
||||
_ = move(prelimary_path, final_path)
|
||||
print(f"Saved as [yellow]{final_file_name}")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue