Skip to content

Conversation

@silverwind
Copy link
Contributor

This is a follow-up on #483. It fixes the readability concern of #595 by restoring the options print to its previous pretty-printed form while adding a final print in case if warnings happened.

I also took the liberty to change the color of warnings from light red to light yellow, as I think that color is more appropriate and red should be reserved for errors only.

@silverwindsilverwind changed the title build: Restore configure formatting, add final message for warningsbuild: restore configure formatting, add final message for warningsJan 27, 2015
@rvagg
Copy link
Member

fine by me, can you give us a screenshot or fixed-format paste into here?

@silverwind
Copy link
ContributorAuthor

Here you go, had to reduce the font size a bit to fit everything on this tiny screen.

screenshot_26

@rvagg
Copy link
Member

lgtm but I'd like signoff from @bnoordhuis too cause I know he did some refactoring of #483 in #585 and may also have suggestions for wording (I don't really like "Careful! Warnings happened" but can't think of a good alternative).

@silverwind
Copy link
ContributorAuthor

I'm open to any suggestions regardind the print and its color. Also noticed I could refactor the final check by removing the msg variable, if that style is prefered.

configure Outdated
Copy link
Member

Choose a reason for hiding this comment

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

I believe it's slightly more pythonic to replace the global with:

defwarn(msg): # ...warn.warned=Truewarn.warned=False

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Good call, I'll fix that.

@silverwindsilverwindforce-pushed the configure-warnings branch 3 times, most recently from 857a4b4 to d2723a2CompareJanuary 28, 2015 16:36
@silverwind
Copy link
ContributorAuthor

@bnoordhuis updated with your suggestions.

@silverwind
Copy link
ContributorAuthor

@bnoordhuis wait, I'll push another update as I noticed this when no warnings occured:

AttributeError: 'function' object has no attribute 'warned' 

configure Outdated
Copy link
Member

Choose a reason for hiding this comment

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

You need to define warn.warned, else you get an AttributeError below when warn() hasn't been called.

On the topic of the commit log, can you make the first line fit in <= 50 characters? Thanks!

@silverwind
Copy link
ContributorAuthor

Whoops, looks like I've broken this PR. Won't let me re-open it while the branch is still active. Guess I need to open a new one, sorry.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@silverwind@rvagg@bnoordhuis