fix flake8 F405 (may be undefined)

This commit is contained in:
Pavol Rusnak 2023-01-22 10:04:34 +00:00
parent a49a654137
commit 388cfc18fa
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 7 additions and 3 deletions

View File

@ -30,7 +30,7 @@ from .tasks import * # noqa: F401,F403
def boltcards_start():
loop = asyncio.get_event_loop()
loop.create_task(catch_everything_and_restart(wait_for_paid_invoices))
loop.create_task(catch_everything_and_restart(wait_for_paid_invoices)) # noqa: F405
from .views import * # noqa: F401,F403

View File

@ -110,7 +110,9 @@ async def get_mining_dashboard(gerty):
)
text.append(
get_text_item_dict(
text="{0}hash".format(si_format(hashrateNow, 6, True, " ")),
text="{0}hash".format(
si_format(hashrateNow, 6, True, " ") # noqa: F405
),
font_size=20,
gerty_type=gerty.type,
)
@ -320,7 +322,9 @@ async def get_mining_stat(stat_slug: str, gerty):
text = []
if stat_slug == "mining_current_hash_rate":
stat = await api_get_mining_stat(stat_slug, gerty)
current = "{0}hash".format(si_format(stat["current"], 6, True, " "))
current = "{0}hash".format(
si_format(stat["current"], 6, True, " ") # noqa: F405
)
text.append(
get_text_item_dict(
text="Current Mining Hashrate", font_size=20, gerty_type=gerty.type