diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9947ab7..84453ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,19 @@ repos: - repo: https://github.com/pycqa/isort - rev: 5.11.4 + rev: 7.0.0 hooks: - id: isort name: isort (python) args: [ "--profile", "black", "--filter-files" ] -- repo: https://github.com/psf/black - rev: 22.12.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 25.12.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.991" + rev: "v1.19.1" hooks: - id: mypy entry: bash -c 'mypy --no-strict-optional --ignore-missing-imports -p hashtablebot' @@ -27,6 +27,6 @@ repos: language: python 'types': [ python ] pass_filenames: false - stages: [ commit ] + stages: [ pre-commit ] additional_dependencies: - twitchio diff --git a/alembic/versions/b793e74202bd_add_bot_user_table.py b/alembic/versions/b793e74202bd_add_bot_user_table.py index 74d3ae8..14d61c3 100644 --- a/alembic/versions/b793e74202bd_add_bot_user_table.py +++ b/alembic/versions/b793e74202bd_add_bot_user_table.py @@ -1,10 +1,11 @@ """Add bot user table Revision ID: b793e74202bd -Revises: +Revises: Create Date: 2022-12-17 17:41:34.916176 """ + import sqlalchemy as sa from alembic import op diff --git a/hashtablebot/banking/bank_user.py b/hashtablebot/banking/bank_user.py index 9ab2605..8322aab 100644 --- a/hashtablebot/banking/bank_user.py +++ b/hashtablebot/banking/bank_user.py @@ -2,14 +2,10 @@ class BankUser(Protocol): - def withdraw(self, amount: int): - ... + def withdraw(self, amount: int): ... - def deposit(self, amount: int): - ... + def deposit(self, amount: int): ... - def name(self) -> str: - ... + def name(self) -> str: ... - def get_balance(self) -> int: - ... + def get_balance(self) -> int: ... diff --git a/hashtablebot/banking/transaction.py b/hashtablebot/banking/transaction.py index ba42943..489a54f 100644 --- a/hashtablebot/banking/transaction.py +++ b/hashtablebot/banking/transaction.py @@ -2,11 +2,8 @@ class Transaction(Protocol): - def execute(self) -> None: - ... + def execute(self) -> None: ... - def undo(self) -> None: - ... + def undo(self) -> None: ... - def redo(self) -> None: - ... + def redo(self) -> None: ... diff --git a/hashtablebot/bot_exceptions.py b/hashtablebot/bot_exceptions.py index 3496eb4..155051f 100644 --- a/hashtablebot/bot_exceptions.py +++ b/hashtablebot/bot_exceptions.py @@ -1,6 +1,7 @@ """ Custom exceptions created for the bot """ + from abc import ABC, abstractmethod