Skip to content

Commit

Permalink
fix: ignore flake false positives about undefined names
Browse files Browse the repository at this point in the history
NOTE: MorphologyImportError is undefined and should be fixed.
  • Loading branch information
sanjayankur31 committed Mar 11, 2021
1 parent 9c924b8 commit 9deb151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion neuroml/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def load_swc_single(cls, src, name=None):
if len(id_to_index_dict) != len(index_to_id):
s = "Internal Error Loading SWC: Index and ID map are different lengths."
s += " [ID:%d, Index:%d]"%( len(index_to_id), len(id_to_index_dict) )
raise MorphologyImportError(s)
# TODO: this is undefined!!
raise MorphologyImportError(s) # noqa: F821

# Vertices and section types are easy:
vertices = d[ ['x','y','z','r'] ]
Expand Down
4 changes: 2 additions & 2 deletions neuroml/nml/nml.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

Validate_simpletypes_ = True
if sys.version_info.major == 2:
BaseStrType_ = basestring
BaseStrType_ = basestring # noqa: F821
else:
BaseStrType_ = str

Expand Down Expand Up @@ -415,7 +415,7 @@ def gds_encode(instring):
def convert_unicode(instring):
if isinstance(instring, str):
result = quote_xml(instring)
elif sys.version_info.major == 2 and isinstance(instring, unicode):
elif sys.version_info.major == 2 and isinstance(instring, unicode): # noqa: F821
result = quote_xml(instring).encode('utf8')
else:
result = GeneratedsSuper.gds_encode(str(instring))
Expand Down

0 comments on commit 9deb151

Please sign in to comment.