Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand All @@ -15,22 +15,22 @@ repos:
files: ^best_buy_bullet_bot/

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 7.0.0
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
hooks:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: 1.14.0
rev: 1.20.0
hooks:
- id: blacken-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-toml
- id: debug-statements
Expand All @@ -52,12 +52,12 @@ repos:
- id: yesqa

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.3.0
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.4.1
hooks:
- id: codespell
types_or: [python, rst, markdown]
Expand Down
16 changes: 10 additions & 6 deletions best_buy_bullet_bot/tracker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ def await_checkout(
sound_effects.stop()

Colors.print(
f'All requested "{title}" were purchased.'
if money_manager.check_funds(pred_price)
else f"With only ${money_manager.get_funds():,.2f} you cannot afford {title}.",
(
f'All requested "{title}" were purchased.'
if money_manager.check_funds(pred_price)
else f"With only ${money_manager.get_funds():,.2f} you cannot afford {title}."
),
"It will no longer be tracked to conserve resources.\n",
properties=["warning"],
)
Expand Down Expand Up @@ -464,9 +466,11 @@ def kill_all(*args, **kwargs):
close_data()

# Forcefully close everything
os.system(
f"taskkill /F /im {psutil.Process(os.getpid()).name()}"
) if WINDOWS else os.killpg(os.getpgid(os.getpid()), signal.SIGKILL)
(
os.system(f"taskkill /F /im {psutil.Process(os.getpid()).name()}")
if WINDOWS
else os.killpg(os.getpgid(os.getpid()), signal.SIGKILL)
)

def clean_kill(*args, **kwargs):
# Suppress error messages created as a result of termination
Expand Down