Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf

This commit fixes the style issues introduced in 2f1562d according to the output
from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java
Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt,
Scalafmt, StandardJS, StandardRB, swift-format and Yapf.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored May 10, 2024
1 parent 2f1562d commit 1f0eaf4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions database/database.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
import sqlite3


class Database:
def __init__(self):
self.connection = sqlite3.connect('banking.db')
self.connection = sqlite3.connect("banking.db")
self.cursor = self.connection.cursor()

def create_table(self):
self.cursor.execute('''CREATE TABLE IF NOT EXISTS accounts (id INTEGER PRIMARY KEY, name TEXT, balance REAL)''')
self.cursor.execute(
"""CREATE TABLE IF NOT EXISTS accounts (id INTEGER PRIMARY KEY, name TEXT, balance REAL)"""
)
self.connection.commit()

def insert_account(self, name, balance):
self.cursor.execute("INSERT INTO accounts (name, balance) VALUES (?, ?)", (name, balance))
self.cursor.execute(
"INSERT INTO accounts (name, balance) VALUES (?, ?)", (name, balance)
)
self.connection.commit()

def update_account(self, id, name, balance):
self.cursor.execute("UPDATE accounts SET name=?, balance=? WHERE id=?", (name, balance, id))
self.cursor.execute(
"UPDATE accounts SET name=?, balance=? WHERE id=?", (name, balance, id)
)
self.connection.commit()

def delete_account(self, id):
Expand Down

0 comments on commit 1f0eaf4

Please sign in to comment.