Browse Source

pylint

pull/76/head
Louis 10 years ago
parent
commit
e3f523c297
  1. 1
      patacrep/content/section.py
  2. 7
      patacrep/content/song.py
  3. 1
      patacrep/content/songsection.py
  4. 1
      patacrep/files.py
  5. 2
      patacrep/templates.py

1
patacrep/content/section.py

@ -15,6 +15,7 @@ FULL_KEYWORDS = KEYWORDS + ["{}*".format(word) for word in KEYWORDS]
class Section(Content):
"""A LaTeX section."""
# pylint: disable=too-few-public-methods
def __init__(self, keyword, name, short=None):
self.keyword = keyword

7
patacrep/content/song.py

@ -67,12 +67,13 @@ def parse(keyword, argument, contentlist, config):
LOGGER.debug('Parsing file "{}"'.format(filename))
extension = filename.split(".")[-1]
if extension not in plugins:
LOGGER.warning(
'I do not know how to parse "{}": name does not end with one of {}. Ignored.'
LOGGER.warning((
'I do not know how to parse "{}": name does '
'not end with one of {}. Ignored.'
).format(
os.path.join(songdir.datadir, filename),
", ".join(["'.{}'".format(key) for key in plugins.keys()]),
)
))
continue
renderer = SongRenderer(plugins[extension](
songdir.datadir,

1
patacrep/content/songsection.py

@ -9,6 +9,7 @@ KEYWORDS = [
class SongSection(Content):
"""A songsection or songchapter."""
# pylint: disable=too-few-public-methods
def __init__(self, keyword, name):
self.keyword = keyword

1
patacrep/files.py

@ -1,7 +1,6 @@
"""File system utilities."""
from contextlib import contextmanager
import fnmatch
import importlib
import logging
import os

2
patacrep/templates.py

@ -45,6 +45,7 @@ class VariablesExtension(Extension):
"""Extension to jinja2 to silently ignore variable block.
Instead, they are parsed by this module.
"""
# pylint: disable=too-few-public-methods
tags = set(['variables'])
def parse(self, parser):
@ -66,6 +67,7 @@ def _escape_tex(value):
class TexRenderer:
"""Render a template to a LaTeX file."""
# pylint: disable=too-few-public-methods
def __init__(self, template, texenv, encoding=None):
self.encoding = encoding

Loading…
Cancel
Save