Format code with black and autopep8 (#488)

This commit is contained in:
0xMRTT 2022-09-23 22:52:17 +02:00 committed by GitHub
commit eff9da54a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 61 deletions

View file

@ -588,7 +588,7 @@ class GradienceApplication(Adw.Application):
dialog = GradienceAppTypeDialog( dialog = GradienceAppTypeDialog(
_("Apply this color scheme?"), _("Apply this color scheme?"),
_( _(
"Warning: any custom CSS files for those app types will be "\ "Warning: any custom CSS files for those app types will be "
"irreversibly overwritten!" "irreversibly overwritten!"
), ),
"apply", "apply",
@ -629,7 +629,7 @@ class GradienceApplication(Adw.Application):
transient_for=self.props.active_window, transient_for=self.props.active_window,
heading=_("Save preset as..."), heading=_("Save preset as..."),
body=_( body=_(
"Saving preset to <tt>{0}</tt>. If that preset already "\ "Saving preset to <tt>{0}</tt>. If that preset already "
"exists, it will be overwritten!" "exists, it will be overwritten!"
).format( ).format(
os.path.join( os.path.join(
@ -657,7 +657,7 @@ class GradienceApplication(Adw.Application):
if len(preset_entry.get_text()) == 0: if len(preset_entry.get_text()) == 0:
dialog.set_body( dialog.set_body(
_( _(
"Saving preset to <tt>{0}</tt>. If that preset "\ "Saving preset to <tt>{0}</tt>. If that preset "
"already exists, it will be overwritten!" "already exists, it will be overwritten!"
).format( ).format(
os.path.join( os.path.join(
@ -674,7 +674,7 @@ class GradienceApplication(Adw.Application):
else: else:
dialog.set_body( dialog.set_body(
_( _(
"Saving preset to <tt>{0}</tt>. If that preset "\ "Saving preset to <tt>{0}</tt>. If that preset "
"already exists, it will be overwritten!" "already exists, it will be overwritten!"
).format( ).format(
os.path.join( os.path.join(
@ -702,7 +702,7 @@ class GradienceApplication(Adw.Application):
transient_for=self.props.active_window, transient_for=self.props.active_window,
heading=_("You have unsaved changes!"), heading=_("You have unsaved changes!"),
body=_( body=_(
"Saving preset to <tt>{0}</tt>. If that preset already "\ "Saving preset to <tt>{0}</tt>. If that preset already "
"exists, it will be overwritten!" "exists, it will be overwritten!"
).format( ).format(
os.path.join( os.path.join(
@ -733,7 +733,7 @@ class GradienceApplication(Adw.Application):
if len(preset_entry.get_text()) == 0: if len(preset_entry.get_text()) == 0:
dialog.set_body( dialog.set_body(
_( _(
"Saving preset to <tt>{0}</tt>. If that preset "\ "Saving preset to <tt>{0}</tt>. If that preset "
"already exists, it will be overwritten!" "already exists, it will be overwritten!"
).format( ).format(
os.path.join( os.path.join(
@ -750,7 +750,7 @@ class GradienceApplication(Adw.Application):
else: else:
dialog.set_body( dialog.set_body(
_( _(
"Saving preset to <tt>{0}</tt>. If that preset "\ "Saving preset to <tt>{0}</tt>. If that preset "
"already exists, it will be overwritten!" "already exists, it will be overwritten!"
).format( ).format(
os.path.join( os.path.join(

View file

@ -46,10 +46,7 @@ class GradienceOption(Adw.ActionRow):
elif adw_gtk3_support == "partial": elif adw_gtk3_support == "partial":
self.warning_button.add_css_class("warning") self.warning_button.add_css_class("warning")
self.warning_label.set_label( self.warning_label.set_label(
_( _("This option is only partially supported by the adw-gtk3 " "theme.")
"This option is only partially supported by the adw-gtk3 "\
"theme."
)
) )
elif adw_gtk3_support == "no": elif adw_gtk3_support == "no":
self.warning_button.add_css_class("error") self.warning_button.add_css_class("error")

View file

@ -95,7 +95,7 @@ class GradiencePluginsList:
group.set_title(_("Plugins")) group.set_title(_("Plugins"))
group.set_description( group.set_description(
_( _(
"Plugins add additional features to Gradience, plugins are "\ "Plugins add additional features to Gradience, plugins are "
"made by Gradience community and can make issues." "made by Gradience community and can make issues."
) )
) )

View file

@ -22,8 +22,8 @@ settings_schema = {
"name": "accent_colors", "name": "accent_colors",
"title": _("Accent Colors"), "title": _("Accent Colors"),
"description": _( "description": _(
"These colors are used across many different widgets, such "\ "These colors are used across many different widgets, such "
"as buttons, labels, and entries, to indicate that a widget "\ "as buttons, labels, and entries, to indicate that a widget "
"is important, interactive, or currently active." "is important, interactive, or currently active."
), ),
"variables": [ "variables": [
@ -31,9 +31,9 @@ settings_schema = {
"name": "accent_color", "name": "accent_color",
"title": _("Standalone Color"), "title": _("Standalone Color"),
"explanation": _( "explanation": _(
"The standalone colors are similar to the background "\ "The standalone colors are similar to the background "
"ones, but provide better contrast when used as "\ "ones, but provide better contrast when used as "
"foreground color on top of a neutral background - "\ "foreground color on top of a neutral background - "
"for example, colorful text in a window." "for example, colorful text in a window."
), ),
"adw_gtk3_support": "yes", "adw_gtk3_support": "yes",
@ -54,7 +54,7 @@ settings_schema = {
"name": "destructive_colors", "name": "destructive_colors",
"title": _("Destructive Colors"), "title": _("Destructive Colors"),
"description": _( "description": _(
"These colors are used for buttons to indicate a dangerous "\ "These colors are used for buttons to indicate a dangerous "
"action, such as deleting a file." "action, such as deleting a file."
), ),
"variables": [ "variables": [
@ -62,9 +62,9 @@ settings_schema = {
"name": "destructive_color", "name": "destructive_color",
"title": _("Standalone Color"), "title": _("Standalone Color"),
"explanation": _( "explanation": _(
"The standalone colors are similar to the background "\ "The standalone colors are similar to the background "
"ones, but provide better contrast when used as "\ "ones, but provide better contrast when used as "
"foreground color on top of a neutral background - "\ "foreground color on top of a neutral background - "
"for example, colorful text in a window." "for example, colorful text in a window."
), ),
"adw_gtk3_support": "yes", "adw_gtk3_support": "yes",
@ -85,8 +85,8 @@ settings_schema = {
"name": "success_colors", "name": "success_colors",
"title": _("Success Colors"), "title": _("Success Colors"),
"description": _( "description": _(
"These colors are used across many different widgets, such "\ "These colors are used across many different widgets, such "
"as buttons, labels, entries, and level bars, to indicate a "\ "as buttons, labels, entries, and level bars, to indicate a "
"success or a high level." "success or a high level."
), ),
"variables": [ "variables": [
@ -94,9 +94,9 @@ settings_schema = {
"name": "success_color", "name": "success_color",
"title": _("Standalone Color"), "title": _("Standalone Color"),
"explanation": _( "explanation": _(
"The standalone colors are similar to the background "\ "The standalone colors are similar to the background "
"ones, but provide better contrast when used as "\ "ones, but provide better contrast when used as "
"foreground color on top of a neutral background - "\ "foreground color on top of a neutral background - "
"for example, colorful text in a window." "for example, colorful text in a window."
), ),
"adw_gtk3_support": "yes", "adw_gtk3_support": "yes",
@ -117,8 +117,8 @@ settings_schema = {
"name": "warning_colors", "name": "warning_colors",
"title": _("Warning Colors"), "title": _("Warning Colors"),
"description": _( "description": _(
"These colors are used across many different widgets, such "\ "These colors are used across many different widgets, such "
"as buttons, labels, entries, and level bars, to indicate a "\ "as buttons, labels, entries, and level bars, to indicate a "
"warning or a low level." "warning or a low level."
), ),
"variables": [ "variables": [
@ -126,9 +126,9 @@ settings_schema = {
"name": "warning_color", "name": "warning_color",
"title": _("Standalone Color"), "title": _("Standalone Color"),
"explanation": _( "explanation": _(
"The standalone colors are similar to the background "\ "The standalone colors are similar to the background "
"ones, but provide better contrast when used as "\ "ones, but provide better contrast when used as "
"foreground color on top of a neutral background - "\ "foreground color on top of a neutral background - "
"for example, colorful text in a window." "for example, colorful text in a window."
), ),
"adw_gtk3_support": "yes", "adw_gtk3_support": "yes",
@ -149,7 +149,7 @@ settings_schema = {
"name": "error_colors", "name": "error_colors",
"title": _("Error Colors"), "title": _("Error Colors"),
"description": _( "description": _(
"These colors are used across many different widgets, such "\ "These colors are used across many different widgets, such "
"as buttons, labels, and entries, to indicate a failure." "as buttons, labels, and entries, to indicate a failure."
), ),
"variables": [ "variables": [
@ -157,9 +157,9 @@ settings_schema = {
"name": "error_color", "name": "error_color",
"title": _("Standalone Color"), "title": _("Standalone Color"),
"explanation": _( "explanation": _(
"The standalone colors are similar to the background "\ "The standalone colors are similar to the background "
"ones, but provide better contrast when used as "\ "ones, but provide better contrast when used as "
"foreground color on top of a neutral background - "\ "foreground color on top of a neutral background - "
"for example, colorful text in a window." "for example, colorful text in a window."
), ),
"adw_gtk3_support": "yes", "adw_gtk3_support": "yes",
@ -197,7 +197,7 @@ settings_schema = {
"name": "view_colors", "name": "view_colors",
"title": _("View Colors"), "title": _("View Colors"),
"description": _( "description": _(
"These colors are used in a variety of widgets, such as text "\ "These colors are used in a variety of widgets, such as text "
"views and entries." "views and entries."
), ),
"variables": [ "variables": [
@ -217,8 +217,8 @@ settings_schema = {
"name": "headerbar_colors", "name": "headerbar_colors",
"title": _("Header Bar Colors"), "title": _("Header Bar Colors"),
"description": _( "description": _(
"These colors are used for header bars, as well as widgets "\ "These colors are used for header bars, as well as widgets "
"that are meant to be visually attached to it, such as "\ "that are meant to be visually attached to it, such as "
"search bars or tab bars." "search bars or tab bars."
), ),
"variables": [ "variables": [
@ -236,13 +236,13 @@ settings_schema = {
"name": "headerbar_border_color", "name": "headerbar_border_color",
"title": _("Border Color"), "title": _("Border Color"),
"explanation": _( "explanation": _(
"The border color has the same default value as a "\ "The border color has the same default value as a "
"foreground color, but doesn't change along with it. "\ "foreground color, but doesn't change along with it. "
"This can be useful if a light window has a dark "\ "This can be useful if a light window has a dark "
"header bar with light text; in this case it may be "\ "header bar with light text; in this case it may be "
"desirable to keep the border dark. This variable is "\ "desirable to keep the border dark. This variable is "
"only used for vertical borders - for example, "\ "only used for vertical borders - for example, "
"separators between the two header bars in a split "\ "separators between the two header bars in a split "
"header bar layout." "header bar layout."
), ),
"adw_gtk3_support": "no", "adw_gtk3_support": "no",
@ -251,11 +251,11 @@ settings_schema = {
"name": "headerbar_backdrop_color", "name": "headerbar_backdrop_color",
"title": _("Backdrop Color"), "title": _("Backdrop Color"),
"explanation": _( "explanation": _(
"The backdrop color is used instead of the "\ "The backdrop color is used instead of the "
"background color when the window is not focused. By "\ "background color when the window is not focused. By "
"default it's an alias of the window's background "\ "default it's an alias of the window's background "
"color and changes together with it. When changing "\ "color and changes together with it. When changing "
"this variable, make sure to set it to a value "\ "this variable, make sure to set it to a value "
"matching your header bar background color." "matching your header bar background color."
), ),
"adw_gtk3_support": "yes", "adw_gtk3_support": "yes",
@ -264,8 +264,8 @@ settings_schema = {
"name": "headerbar_shade_color", "name": "headerbar_shade_color",
"title": _("Shade Color"), "title": _("Shade Color"),
"explanation": _( "explanation": _(
"The shade color is used to provide a dark border "\ "The shade color is used to provide a dark border "
"for header bars and similar widgets that separates "\ "for header bars and similar widgets that separates "
"them from the main window." "them from the main window."
), ),
"adw_gtk3_support": "no", "adw_gtk3_support": "no",
@ -275,9 +275,7 @@ settings_schema = {
{ {
"name": "card_colors", "name": "card_colors",
"title": _("Card Colors"), "title": _("Card Colors"),
"description": _( "description": _("These colors are used for cards and boxed lists."),
"These colors are used for cards and boxed lists."
),
"variables": [ "variables": [
{ {
"name": "card_bg_color", "name": "card_bg_color",
@ -293,8 +291,8 @@ settings_schema = {
"name": "card_shade_color", "name": "card_shade_color",
"title": _("Shade Color"), "title": _("Shade Color"),
"explanation": _( "explanation": _(
"The shade color is used for shadows that are used "\ "The shade color is used for shadows that are used "
"by cards to separate themselves from the window "\ "by cards to separate themselves from the window "
"background, as well as for row dividers in the cards." "background, as well as for row dividers in the cards."
), ),
"adw_gtk3_support": "no", "adw_gtk3_support": "no",
@ -344,8 +342,8 @@ settings_schema = {
"name": "shade_color", "name": "shade_color",
"title": _("Shade Color"), "title": _("Shade Color"),
"explanation": _( "explanation": _(
"The shade color is used by inline tab bars, as well "\ "The shade color is used by inline tab bars, as well "
"as the transitions in leaflets and flaps, and info "\ "as the transitions in leaflets and flaps, and info "
"bar borders." "bar borders."
), ),
"adw_gtk3_support": "no", "adw_gtk3_support": "no",
@ -354,8 +352,8 @@ settings_schema = {
"name": "scrollbar_outline_color", "name": "scrollbar_outline_color",
"title": _("Scrollbar Outline Color"), "title": _("Scrollbar Outline Color"),
"explanation": _( "explanation": _(
"The scrollbar outline color is used by scrollbars "\ "The scrollbar outline color is used by scrollbars "
"to ensure that overlay scrollbars are visible "\ "to ensure that overlay scrollbars are visible "
"regardless of the content color." "regardless of the content color."
), ),
"adw_gtk3_support": "no", "adw_gtk3_support": "no",