Skip to content

Commit

Permalink
pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
diamant3 committed Jul 9, 2024
1 parent af5c6a0 commit a16c474
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions sysig.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@

# Main window
with dpg.window(
no_title_bar=True,
no_move=True,
width=WINDOW_WIDTH,
height=WINDOW_HEIGHT,
no_title_bar=True,
no_move=True,
width=WINDOW_WIDTH,
height=WINDOW_HEIGHT,
pos=(0, 0),
):
dpg.add_text("System Information Gatherer", pos=(int(WINDOW_WIDTH / 2.9), 12), color=COLOR)
Expand All @@ -72,8 +72,8 @@

with dpg.window(
label="Processor Information",
modal=True,
show=False,
modal=True,
show=False,
tag="Processor_modal_ID",
autosize=True,
):
Expand All @@ -87,31 +87,31 @@
try:
l1_data = humanize.naturalsize(GCI['l1_instruction_cache_size'], gnu=True)
dpg.add_text(f"L1 Instruction Cache Size: {l1_data}", bullet=True)
except KeyError:
except KeyError:
dpg.add_text("L1 Instruction Cache Size: Can't determine", bullet=True)

try:
l1_instruction = humanize.naturalsize(GCI['l1_data_cache_size'], gnu=True)
dpg.add_text(f"L1 Data Cache Size: {l1_instruction}", bullet=True)
except KeyError:
except KeyError:
dpg.add_text("L1 Data Cache Size: Can't determine", bullet=True)

try:
l2 = humanize.naturalsize(GCI['l2_cache_size'], gnu=True)
l2 = humanize.naturalsize(GCI['l2_cache_size'], gnu=True)
dpg.add_text(f"L2 Cache Size: {l2}", bullet=True)
except KeyError:
except KeyError:
dpg.add_text("L2 Cache Size: Can't determine", bullet=True)

try:
try:
l3 = humanize.naturalsize(GCI['l3_cache_size'], gnu=True)
dpg.add_text(f"L3 Cache Size: {l3}", bullet=True)
except KeyError:
except KeyError:
dpg.add_text("L3 Cache Size: Can't determine", bullet=True)

with dpg.tree_node(label="Flags"):
with dpg.table(
header_row=False,
policy=dpg.mvTable_SizingStretchProp,
header_row=False,
policy=dpg.mvTable_SizingStretchProp,
row_background=True,
borders_innerH=True,
borders_innerV=True,
Expand All @@ -136,7 +136,9 @@

with dpg.group(horizontal=True):
dpg.add_text("CPU Utilization(Total): ", bullet=True)

def cpu_util():
""" cpu utilization thread """
while 1:
val = psutil.cpu_percent(interval=1, percpu=False)
dpg.set_value("util_progress", (1.0 / 100.0) * val)
Expand Down Expand Up @@ -183,8 +185,8 @@ def cpu_util():

with dpg.window(
label="Memory Information",
modal=True,
show=False,
modal=True,
show=False,
tag="Memory_modal_ID",
autosize=True,
):
Expand Down

0 comments on commit a16c474

Please sign in to comment.