Skip to content

Commit

Permalink
Making the Pylint happy for PR #197
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Jul 8, 2024
1 parent 31c3a76 commit d283842
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qui/updater/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@ class QubeClass(Enum):
AppVM = 3
DispVM = 4

# pylint: disable=global-statement
# TODO: Encapsulate the below variable within a class
__effective_css_provider__: Gtk.CssProvider = None

def SetEffectiveCssProvider(CssProvider: Gtk.CssProvider) -> None:
global __effective_css_provider__
__effective_css_provider__ = CssProvider

def label_color_theme(color: str) -> str:
global __effective_css_provider__
widget = Gtk.Label()
if __effective_css_provider__ == None:
if not __effective_css_provider__:
# Replicating the old behaviour. Both forward and backward compatible
widget.get_style_context().add_class(f'qube-box-{color}')
elif f'.qube-box-{color}' in __effective_css_provider__.to_string():
Expand Down

0 comments on commit d283842

Please sign in to comment.