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

Dev #387

Merged
merged 12 commits into from
Jun 6, 2024
Merged

Dev #387

merged 12 commits into from
Jun 6, 2024

Conversation

smk762
Copy link
Owner

@smk762 smk762 commented Jun 6, 2024

No description provided.

Copy link
Contributor

@code-review-doctor code-review-doctor bot 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. Worth considering though. View full project report here.

break

if loop > 12:
await channel.send(f"<@448777271701143562> Mining endpoint not responding!\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
await channel.send(f"<@448777271701143562> Mining endpoint not responding!\n")
await channel.send("<@448777271701143562> Mining endpoint not responding!\n")

f-string is unnecessary here. This can just be a string. More.

seconds -= value * count
if value == 1:
name = name.rstrip('s')
result.append("{} {}".format(value, name))
Copy link
Contributor

Choose a reason for hiding this comment

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

f-string is easier to read, write, and less computationally expensive than legacy string formatting. More info.


load_dotenv()

class JsonSerde(object): # pragma: no cover
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
class JsonSerde(object): # pragma: no cover
class JsonSerde: # pragma: no cover

JsonSerde inherits from object by default, so explicitly inheriting from object is redundant. Removing it keeps the code simpler. More.

notary_list = get_notary_list(season)
def get_daily_stats_sorted(notary_list, dpow_coins_dict):
logger.info("get_daily_stats_sorted")
cache_key = f"daily_stats_sorted"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cache_key = f"daily_stats_sorted"
cache_key = "daily_stats_sorted"

f-string is unnecessary here. This can just be a string. Explained here.

@smk762 smk762 merged commit fa1c084 into master Jun 6, 2024
2 of 3 checks passed
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.

1 participant