Fix all pylint warnings

This commit is contained in:
Ivan R. 2022-12-15 22:34:06 +05:00
parent be72f4f693
commit 3d63e3d4b9
No known key found for this signature in database
GPG key ID: 56C7BAAE859B302C

View file

@ -1,4 +1,10 @@
#!/usr/bin/env python3
"""
Histd: how I spent this day.
A simple but useful personal diary CLI utility.
"""
from datetime import date
import os
import subprocess
@ -6,6 +12,10 @@ import sys
def main():
"""
Main function, run first.
Prepares environment and parses commands.
"""
base_dir = get_base_dir()
today = date.today()
@ -94,7 +104,7 @@ def merge(base_dir: str):
strings.append(res)
# It's a file
else:
with open(entry_path, 'r') as note:
with open(entry_path, 'r', encoding='utf-8') as note:
strings.append(f'## {entry_path}')
strings.append(note.read())