Fix all pylint warnings
This commit is contained in:
parent
be72f4f693
commit
3d63e3d4b9
1 changed files with 15 additions and 5 deletions
12
histd.py
12
histd.py
|
@ -1,4 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
"""
|
||||||
|
Histd: how I spent this day.
|
||||||
|
A simple but useful personal diary CLI utility.
|
||||||
|
"""
|
||||||
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -6,6 +12,10 @@ import sys
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
"""
|
||||||
|
Main function, run first.
|
||||||
|
Prepares environment and parses commands.
|
||||||
|
"""
|
||||||
base_dir = get_base_dir()
|
base_dir = get_base_dir()
|
||||||
today = date.today()
|
today = date.today()
|
||||||
|
|
||||||
|
@ -94,7 +104,7 @@ def merge(base_dir: str):
|
||||||
strings.append(res)
|
strings.append(res)
|
||||||
# It's a file
|
# It's a file
|
||||||
else:
|
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(f'## {entry_path}')
|
||||||
strings.append(note.read())
|
strings.append(note.read())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue