mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-02 18:45:17 +12:00
black formatting
This commit is contained in:
parent
1350800405
commit
2b698f477f
|
@ -487,7 +487,7 @@ class ActivityLogger(commands.Cog):
|
||||||
|
|
||||||
# make graph and send it
|
# make graph and send it
|
||||||
fontsize = 30
|
fontsize = 30
|
||||||
fig = plt.figure(figsize=(50,30))
|
fig = plt.figure(figsize=(50, 30))
|
||||||
ax = plt.axes()
|
ax = plt.axes()
|
||||||
|
|
||||||
# set date formater for x axis
|
# set date formater for x axis
|
||||||
|
@ -503,7 +503,7 @@ class ActivityLogger(commands.Cog):
|
||||||
for col_name, col_data in df.iteritems():
|
for col_name, col_data in df.iteritems():
|
||||||
if col_name == "times":
|
if col_name == "times":
|
||||||
continue
|
continue
|
||||||
plt.plot("times", col_name, data=df, linewidth=3, marker='o', markersize=8)
|
plt.plot("times", col_name, data=df, linewidth=3, marker="o", markersize=8)
|
||||||
|
|
||||||
# make graph look nice
|
# make graph look nice
|
||||||
plt.title(f"{user} message history from {end_time} to now", fontsize=fontsize)
|
plt.title(f"{user} message history from {end_time} to now", fontsize=fontsize)
|
||||||
|
@ -512,7 +512,7 @@ class ActivityLogger(commands.Cog):
|
||||||
plt.xticks(fontsize=fontsize)
|
plt.xticks(fontsize=fontsize)
|
||||||
plt.yticks(fontsize=fontsize)
|
plt.yticks(fontsize=fontsize)
|
||||||
plt.grid(True)
|
plt.grid(True)
|
||||||
plt.legend(loc="best", prop={'size': 30})
|
plt.legend(loc="best", prop={"size": 30})
|
||||||
fig.tight_layout()
|
fig.tight_layout()
|
||||||
|
|
||||||
fig.savefig(save_path, dpi=fig.dpi)
|
fig.savefig(save_path, dpi=fig.dpi)
|
||||||
|
@ -552,7 +552,7 @@ class ActivityLogger(commands.Cog):
|
||||||
with open(log, "r") as f:
|
with open(log, "r") as f:
|
||||||
for line in reversed(list(f)):
|
for line in reversed(list(f)):
|
||||||
# time interval check:
|
# time interval check:
|
||||||
try: # shouldnt happen, but just in case
|
try: # shouldnt happen, but just in case
|
||||||
current_time = parse_time_naive(line[:19])
|
current_time = parse_time_naive(line[:19])
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue