diff --git a/src/dragonglass/__init__.py b/src/dragonglass/__init__.py index 3351988..f690a02 100644 --- a/src/dragonglass/__init__.py +++ b/src/dragonglass/__init__.py @@ -1 +1 @@ -from .dragonglass import main +from .dragonglass import main as main diff --git a/src/dragonglass/dragonglass.py b/src/dragonglass/dragonglass.py index 2e65dbe..5f2cf90 100644 --- a/src/dragonglass/dragonglass.py +++ b/src/dragonglass/dragonglass.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import argparse -import sys import yaml from pathlib import Path from tree import SourceNode, SourceIndex diff --git a/src/dragonglass/tree.py b/src/dragonglass/tree.py index aae5a2c..f36f001 100644 --- a/src/dragonglass/tree.py +++ b/src/dragonglass/tree.py @@ -50,13 +50,13 @@ class SourceNode: def load_metadata(self, source_dir): if self._is_md and not self._is_dir: with open(source_dir / self._path, "r", encoding="utf-8") as f: - l = f.readline() - if l == '---\n': + cur_line = f.readline() + if cur_line == '---\n': metalines = [] - l = f.readline() - while l != '---\n': - metalines.append(l) - l = f.readline() + cur_line = f.readline() + while cur_line != '---\n': + metalines.append(cur_line) + cur_line = f.readline() self.metadata = yaml.full_load(''.join(metalines)) def parse_markdown(self, source_dir, markdown_parser):