Skip to content

Commit 0e4a965

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 5bb371e commit 0e4a965

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

jupyter_scheduler/executors.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ class ExecutionManager(ABC):
2929
_model = None
3030
_db_session = None
3131

32-
def __init__(self, job_id: str, root_dir: str, db_url: str, staging_paths: Dict[str, str], database_manager=None):
32+
def __init__(
33+
self,
34+
job_id: str,
35+
root_dir: str,
36+
db_url: str,
37+
staging_paths: Dict[str, str],
38+
database_manager=None,
39+
):
3340
self.job_id = job_id
3441
self.staging_paths = staging_paths
3542
self.root_dir = root_dir

jupyter_scheduler/managers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
55

66
class DatabaseManager(ABC):
77
"""Base class for database managers.
8-
8+
99
Database managers handle database operations for jupyter-scheduler.
1010
Subclasses can implement custom storage backends (K8s, Redis, etc.)
1111
while maintaining compatibility with the scheduler's session interface.
1212
"""
13-
13+
1414
@abstractmethod
1515
def create_session(self, db_url: str):
1616
"""Create a database session.
17-
17+
1818
Args:
1919
db_url: Database URL (e.g., "k8s://namespace", "redis://localhost")
20-
20+
2121
Returns:
2222
Session object compatible with SQLAlchemy session interface
2323
"""
2424
pass
25-
26-
@abstractmethod
25+
26+
@abstractmethod
2727
def create_tables(self, db_url: str, drop_tables: bool = False):
2828
"""Create database tables/schema.
29-
29+
3030
Args:
3131
db_url: Database URL
3232
drop_tables: Whether to drop existing tables first
3333
"""
34-
pass
34+
pass

jupyter_scheduler/orm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def create_tables(db_url, drop_tables=False, Base=Base, database_manager=None):
150150
if database_manager:
151151
database_manager.create_tables(db_url, drop_tables)
152152
return
153-
153+
154154
engine = create_engine(db_url)
155155
update_db_schema(engine, Base)
156156

@@ -166,7 +166,7 @@ def create_tables(db_url, drop_tables=False, Base=Base, database_manager=None):
166166
def create_session(db_url, database_manager=None):
167167
if database_manager:
168168
return database_manager.create_session(db_url)
169-
169+
170170
engine = create_engine(db_url, echo=False)
171171
Session = sessionmaker(bind=engine)
172172

0 commit comments

Comments
 (0)