Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Jul 3, 2018
1 parent c4919c1 commit d253620
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mappyfile/parser.py
Expand Up @@ -162,7 +162,7 @@ def _assign_comments(self, _tree, prev_end_line):
def load(self, fp):
text = fp.read()
if os.path.isfile(fp.name):
fn = fp.name # name is a read-only attribute and may not be present on all file-like objects.
fn = fp.name # name is a read-only attribute and may not be present on all file-like objects.
else:
fn = None
return self.parse(text, fn)
Expand Down
6 changes: 3 additions & 3 deletions mappyfile/utils.py
Expand Up @@ -62,7 +62,7 @@ def open(fn, expand_includes=True, include_comments=False, include_position=Fals
Notes
-----
Partial Mapfiles can also be opened, for example a file containing a ``LAYER`` object.
Partial Mapfiles can also be opened, for example a file containing a ``LAYER`` object.
"""
p = Parser(expand_includes=expand_includes,
Expand Down Expand Up @@ -106,7 +106,7 @@ def load(fp, expand_includes=True, include_position=False, include_comments=Fals
Notes
-----
Partial Mapfiles can also be opened, for example a file containing a ``LAYER`` object.
Partial Mapfiles can also be opened, for example a file containing a ``LAYER`` object.
"""
p = Parser(expand_includes=expand_includes,
include_comments=include_comments)
Expand Down Expand Up @@ -331,7 +331,7 @@ def findkey(d, *keys):
def validate(d):
"""
Validate a mappyfile dictionary by using the Mapfile schema
:param dictionary d: A Python dictionary based on the the mappyfile schema
"""
v = Validator()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_includes.py
Expand Up @@ -107,7 +107,7 @@ def test_two_includes():


def test_include_from_filehandle():
p = Parser()

fn = './tests/samples/include1.map'

with open(fn) as f:
Expand Down

0 comments on commit d253620

Please sign in to comment.