Skip to content

Commit

Permalink
added pylint disables
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Oct 27, 2023
1 parent f108338 commit 3269489
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/lsst/cmservice/db/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ async def check_prerequisites(
async with session.begin_nested():
try:
await session.refresh(self, attribute_names=["prereqs_"])
except Exception:
except Exception: # pylint: disable=broad-exception-caught
return True
for prereq_ in self.prereqs_:
is_done = await prereq_.is_done(session)
Expand Down
2 changes: 1 addition & 1 deletion src/lsst/cmservice/db/script_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def get_create_kwargs(
return ret_dict

@classmethod
async def load(
async def load( # pylint: disable=too-many-arguments
cls,
session: async_scoped_session,
name: str,
Expand Down
5 changes: 3 additions & 2 deletions src/lsst/cmservice/handlers/interface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=too-many-lines
from typing import TYPE_CHECKING, Any, Dict, List

from fastapi import HTTPException
Expand Down Expand Up @@ -1214,7 +1215,7 @@ async def load_specification(
return result


async def load_and_create_campaign(
async def load_and_create_campaign( # pylint: disable=too-many-arguments
session: async_scoped_session,
yaml_file: str,
parent_name: str,
Expand Down Expand Up @@ -1264,7 +1265,7 @@ async def load_and_create_campaign(

try:
await db.Production.create_row(session, name=parent_name)
except Exception:
except Exception: # pylint: disable=broad-exception-caught
pass

result = await create_campaign(
Expand Down
4 changes: 2 additions & 2 deletions src/lsst/cmservice/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
@app.on_event("startup")
async def startup_event() -> None:
await db_session_dependency.initialize(config.database_url, config.database_password)
assert db_session_dependency._engine is not None
db_session_dependency._engine.echo = config.database_echo
assert db_session_dependency._engine is not None # pylint: disable=protected-access
db_session_dependency._engine.echo = config.database_echo # pylint: disable=protected-access
await arq_dependency.initialize(mode=config.arq_mode, redis_settings=config.arq_redis_settings)


Expand Down
4 changes: 2 additions & 2 deletions src/lsst/cmservice/main_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
@app.on_event("startup")
async def startup_event() -> None:
await db_session_dependency.initialize(config.database_url, config.database_password)
assert db_session_dependency._engine is not None
db_session_dependency._engine.echo = config.database_echo
assert db_session_dependency._engine is not None # pylint: disable=protected-access
db_session_dependency._engine.echo = config.database_echo # pylint: disable=protected-access
await arq_dependency.initialize(mode=config.arq_mode, redis_settings=config.arq_redis_settings)


Expand Down

0 comments on commit 3269489

Please sign in to comment.