de-linted source
This commit is contained in:
parent
96b611880c
commit
ab2b775e3a
|
@ -1 +1 @@
|
||||||
from .dragonglass import main
|
from .dragonglass import main as main
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
|
||||||
import yaml
|
import yaml
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tree import SourceNode, SourceIndex
|
from tree import SourceNode, SourceIndex
|
||||||
|
|
|
@ -50,13 +50,13 @@ class SourceNode:
|
||||||
def load_metadata(self, source_dir):
|
def load_metadata(self, source_dir):
|
||||||
if self._is_md and not self._is_dir:
|
if self._is_md and not self._is_dir:
|
||||||
with open(source_dir / self._path, "r", encoding="utf-8") as f:
|
with open(source_dir / self._path, "r", encoding="utf-8") as f:
|
||||||
l = f.readline()
|
cur_line = f.readline()
|
||||||
if l == '---\n':
|
if cur_line == '---\n':
|
||||||
metalines = []
|
metalines = []
|
||||||
l = f.readline()
|
cur_line = f.readline()
|
||||||
while l != '---\n':
|
while cur_line != '---\n':
|
||||||
metalines.append(l)
|
metalines.append(cur_line)
|
||||||
l = f.readline()
|
cur_line = f.readline()
|
||||||
self.metadata = yaml.full_load(''.join(metalines))
|
self.metadata = yaml.full_load(''.join(metalines))
|
||||||
|
|
||||||
def parse_markdown(self, source_dir, markdown_parser):
|
def parse_markdown(self, source_dir, markdown_parser):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user