Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Normalize usage of newlines. #1769

Merged
merged 3 commits into from
May 3, 2024
Merged

Conversation

freakboy3742
Copy link
Member

#1766 included a newline cleanup that isn't entirely compatible with the line splitting approach being used.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@rmartin16 rmartin16 left a comment

Choose a reason for hiding this comment

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

Question about the vertical spacing.

Also, do you think the logging API might benefit from extra optional parameters that can insert vertical space before and after the content to log? This is a common pattern.

Comment on lines 687 to 696
if getattr(app, "splash", None):
self.logger.warning()
self.logger.warning(
"\nSplash screens are now configured based on the icon. "
"The splash configuration will be ignored.\n"
"Splash screens are now configured based on the icon. "
"The splash configuration will be ignored."
)

self.logger.info()
for extension, doctype in self.document_type_icon_targets(app).items():
for size, target in doctype.items():
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand this empty info() call. Do we always want space here?

In most cases, we'll just get an extra line before the next step.

Without splash in pyproject.toml:

Installing app requirements... done

[helloworld] Installing application resources...
Unable to find src/helloworld/resources/helloworld-16.png for 16px application icon; using default
Unable to find src/helloworld/resources/helloworld-32.png for 32px application icon; using default
Unable to find src/helloworld/resources/helloworld-64.png for 64px application icon; using default
Unable to find src/helloworld/resources/helloworld-128.png for 128px application icon; using default
Unable to find src/helloworld/resources/helloworld-256.png for 256px application icon; using default
Unable to find src/helloworld/resources/helloworld-512.png for 512px application icon; using default


[helloworld] Removing unneeded app content...
Removing unneeded app bundle content... done

[helloworld] Created build/helloworld/pop/jammy

With splash in pyproject.toml:

Installing app requirements... done

[helloworld] Installing application resources...
Unable to find src/helloworld/resources/helloworld-16.png for 16px application icon; using default
Unable to find src/helloworld/resources/helloworld-32.png for 32px application icon; using default
Unable to find src/helloworld/resources/helloworld-64.png for 64px application icon; using default
Unable to find src/helloworld/resources/helloworld-128.png for 128px application icon; using default
Unable to find src/helloworld/resources/helloworld-256.png for 256px application icon; using default
Unable to find src/helloworld/resources/helloworld-512.png for 512px application icon; using default

Splash screens are now configured based on the icon. The splash configuration will be ignored.


[helloworld] Removing unneeded app content...
Removing unneeded app bundle content... done

[helloworld] Created build/helloworld/pop/jammy

Copy link
Member Author

Choose a reason for hiding this comment

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

Dang... the intention was to put a single break between the app icons and the document icons... but I forgot about the "there aren't any document icons" case. Fix incoming.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've opted to put the blank inside the outer loop; that means there will be a line break between the app icons and the first document icon (if there is one), and a break between each document icon group.

@@ -0,0 +1 @@
The usage of newlines in a message was modified to be consistent with line autosplitting.
Copy link
Member

@rmartin16 rmartin16 May 2, 2024

Choose a reason for hiding this comment

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

FWIW, the Sphinx spell checker won't like autosplitting....but I think that won't matter since this is a misc note...

Copy link
Member Author

Choose a reason for hiding this comment

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

It will still bite my ass when I do the release on Monday, so I'll fix it now :-)

Copy link
Member

@rmartin16 rmartin16 left a comment

Choose a reason for hiding this comment

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

looks good

@rmartin16 rmartin16 merged commit a10e379 into beeware:main May 3, 2024
51 checks passed
@freakboy3742 freakboy3742 deleted the newline-cleanup branch May 3, 2024 00:15
Sign up for free to 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.

None yet

2 participants