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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -27,6 +27,6 @@ repos:
language: python
'types': [ python ]
pass_filenames: false
stages: [ commit ]
stages: [ pre-commit ]
additional_dependencies:
- twitchio
3 changes: 2 additions & 1 deletion alembic/versions/b793e74202bd_add_bot_user_table.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 4 additions & 8 deletions hashtablebot/banking/bank_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
9 changes: 3 additions & 6 deletions hashtablebot/banking/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
1 change: 1 addition & 0 deletions hashtablebot/bot_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Custom exceptions created for the bot
"""

from abc import ABC, abstractmethod


Expand Down