diff --git a/patacrep/songs/chordpro/__init__.py b/patacrep/songs/chordpro/__init__.py index a04d6dd5..6d4c0e39 100644 --- a/patacrep/songs/chordpro/__init__.py +++ b/patacrep/songs/chordpro/__init__.py @@ -17,9 +17,19 @@ class ChordproSong(Song): @staticmethod def iter_template_paths(templatedirs, output_format): + """Iterate over paths in which templates are to be searched. + + :param iterator templatedirs: Iterators of additional directories (the + default hard-coded template directory is returned last). + :param str output_format: Song output format, which is appended to + each directory. + """ for directory in templatedirs: yield os.path.join(directory, output_format) - yield os.path.join(os.path.abspath(pkg_resources.resource_filename(__name__, 'data')), output_format) + yield os.path.join( + os.path.abspath(pkg_resources.resource_filename(__name__, 'data')), + output_format, + ) def _parse(self, config): """Parse content, and return the dictionary of song data.""" @@ -33,7 +43,7 @@ class ChordproSong(Song): 'song': song, } - def render(self, output_format, output=None, template="song", templatedirs=None): + def render(self, output_format, output=None, template="song", templatedirs=None): # pylint: disable=arguments-differ if templatedirs is None: templatedirs = [] diff --git a/patacrep/songs/latex/__init__.py b/patacrep/songs/latex/__init__.py index 805f77f2..6ac54c81 100644 --- a/patacrep/songs/latex/__init__.py +++ b/patacrep/songs/latex/__init__.py @@ -14,7 +14,7 @@ from patacrep.songs import Song class LatexSong(Song): """LaTeX song parser.""" - def parse(self, __config): + def _parse(self, __config): """Parse content, and return the dictinory of song data.""" with encoding.open_read(self.fullpath, encoding=self.encoding) as song: self.data = parse_song(song.read(), self.fullpath)