Use basedpyright refactor
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
from typing import Optional
|
||||
|
||||
from folkugat_web.dal.sql import Connection, get_connection
|
||||
|
||||
|
||||
def create_db(con: Optional[Connection] = None):
|
||||
def create_db(con: Connection | None = None):
|
||||
with get_connection(con) as con:
|
||||
create_playlists_table(con)
|
||||
|
||||
@@ -11,7 +9,7 @@ def create_db(con: Optional[Connection] = None):
|
||||
def drop_playlists_table(con: Connection):
|
||||
query = "DROP TABLE IF EXISTS playlists"
|
||||
cur = con.cursor()
|
||||
cur.execute(query)
|
||||
_ = cur.execute(query)
|
||||
|
||||
|
||||
def create_playlists_table(con: Connection):
|
||||
@@ -24,4 +22,4 @@ def create_playlists_table(con: Connection):
|
||||
)
|
||||
"""
|
||||
cur = con.cursor()
|
||||
cur.execute(query)
|
||||
_ = cur.execute(query)
|
||||
|
||||
Reference in New Issue
Block a user