Resolve five undefined names found by flake8#112
Merged
Conversation
added 3 commits
September 25, 2018 18:09
[flake8](http://flake8.pycqa.org) testing of https://github.com/CellProfiler/python-bioformats on Python 2.7.14 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./bioformats/__init__.py:98:5: F821 undefined name 'J' J.kill_vm() ^ ./bioformats/formatreader.py:751:59: F821 undefined name 'path' "The file, \"%s\", does not exist." % path, ^ ./bioformats/formatreader.py:752:21: F821 undefined name 'path' path) ^ ./bioformats/omexml.py:1164:39: F821 undefined name 'NS_SPW' make_text_node(self.node, NS_SPW, "Description", test) ^ ./bioformats/omexml.py:1164:62: F821 undefined name 'test' make_text_node(self.node, NS_SPW, "Description", test) ^ 5 F821 undefined name 'J' 5 ```
__path__ is an _undefined name_ in the context which will probably raise a __NameError__ at runtime instead of the desired Exception.
__NS_SPW__ is probably somehow related to https://www.openmicroscopy.org/Schemas/SPW/2015-01/SPW.xsd
AetherUnbound
left a comment
Collaborator
There was a problem hiding this comment.
Awesome, one small change to fix NS_SPW
|
|
||
| def set_Description(self, text): | ||
| make_text_node(self.node, NS_SPW, "Description", test) | ||
| make_text_node(self.node, NS_SPW, "Description", text) |
Collaborator
There was a problem hiding this comment.
It looks like NS_SPW should be self.ns['spw'] here: 9db7b40#diff-c03896582c54075ff85c7ee8f756ebf6R897
toloudis
added a commit
to AllenCellModeling/aicsimageio
that referenced
this pull request
Oct 31, 2019
bonus fix for set_Description from CellProfiler/python-bioformats#112
toloudis
added a commit
to AllenCellModeling/aicsimageio
that referenced
this pull request
Oct 31, 2019
* add get_physical_pixel_size to czi and ome tiff readers * bonus fix for set_Description from CellProfiler/python-bioformats#112 * use tuple instead of list
janeknowsbest77
added a commit
to janeknowsbest77/aicsimageio
that referenced
this pull request
Jul 25, 2024
* add get_physical_pixel_size to czi and ome tiff readers * bonus fix for set_Description from CellProfiler/python-bioformats#112 * use tuple instead of list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111. flake8 testing of https://github.com/CellProfiler/python-bioformats on Python 2.7.14
NS_SPW is probably related to https://www.openmicroscopy.org/Schemas/SPW/2015-01/SPW.xsd
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics