Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

notodiff fixes #319

Merged
merged 5 commits into from
Nov 21, 2016
Merged

notodiff fixes #319

merged 5 commits into from
Nov 21, 2016

Conversation

jamesgk
Copy link
Contributor

@jamesgk jamesgk commented Nov 21, 2016

Should fix #315

James Godfrey-Kittle added 5 commits November 21, 2016 11:04
Before this would pad with more than one space than necessary when the
width of the spaces just matched the width of the padded glyph.
@@ -109,7 +121,14 @@ def input_from_name(self, name, features=(), seen=None, pad=False):
# recursive calls that it makes might have themselves returned None,
# but we should avoid returning None here if there are other options
inputs = [i for i in inputs if i is not None]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or filter(None, inputs)? I guess not if i is a type that can be not None yet still convert to False

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the reason why I avoid using filter is that it behaves differently between python 2 and 3 (where it returns a filter object). For example bool(filter(None, [0])) is False in python 2 but True in python 3. Not an issue (yet) for nototools but still something I like to avoid.

@jamesgk jamesgk merged commit 1fae59b into master Nov 21, 2016
@jamesgk jamesgk deleted the notodiff branch November 21, 2016 21:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

notodiff: png image is not wide enough
2 participants