Skip to content

Commit

Permalink
Fix pycodestyle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Mar 20, 2017
1 parent d6634d3 commit c8ba036
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .pycodestyle.ini
Expand Up @@ -5,4 +5,5 @@
# E501: line too long (checked by PyLint)
# E711: comparison to None (used to improve test style)
# E712: comparison to True (used to improve test style)
ignore = E401,E402,E501,E711,E712
# E741 ambiguous variable name
ignore = E401,E402,E501,E711,E712,E741
1 change: 1 addition & 0 deletions doorstop/cli/main.py
Expand Up @@ -313,5 +313,6 @@ def _publish(subs, shared):
help="do not include levels on heading and non-heading or non-heading items")
sub.add_argument('--template', help="template file", default=publisher.HTMLTEMPLATE)


if __name__ == '__main__': # pragma: no cover (manual test)
main()
3 changes: 2 additions & 1 deletion doorstop/core/item.py
Expand Up @@ -15,6 +15,7 @@
from doorstop.core import editor
from doorstop import settings


log = common.logger(__name__)


Expand Down Expand Up @@ -507,7 +508,7 @@ def unlink(self, value):
except KeyError:
log.warning("link to {0} does not exist".format(uid))

def get_issues(self, skip=None, document_hook=None, item_hook=None): # pylint: disable=unused-argument
def get_issues(self, skip=None, document_hook=None, item_hook=None): # pylint: disable=unused-argument
"""Yield all the item's issues.
:param skip: list of document prefixes to skip
Expand Down
3 changes: 2 additions & 1 deletion doorstop/core/types.py
Expand Up @@ -111,7 +111,7 @@ def __init__(self, *values, stamp=None):
else:
self.value = str(value) if values[0] else ''
elif len(values) == 4:
self.value = UID.join_uid(*values) # pylint: disable=no-value-for-parameter
self.value = UID.join_uid(*values) # pylint: disable=no-value-for-parameter
else:
raise TypeError("__init__() takes 1 or 4 positional arguments")
# Split values
Expand Down Expand Up @@ -238,6 +238,7 @@ def representer(dumper, data):
return dumper.represent_scalar('tag:yaml.org,2002:str', data,
style='|' if data else '')


yaml.add_representer(_Literal, _Literal.representer)


Expand Down

0 comments on commit c8ba036

Please sign in to comment.