Skip to content

Commit 8b7375c

Browse files
committed
fix: correct comment formatting and clean up whitespace in session manager
1 parent be853da commit 8b7375c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pyrevitlib/pyrevit/loader/sessionmgr.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# encoding: utf-8
12
"""The loader module manages the workflow of loading a new pyRevit session.
23
34
Its main purpose is to orchestrate the process of finding pyRevit extensions,
@@ -40,7 +41,7 @@
4041
from pyrevit import DB, UI, revit
4142

4243

43-
#pylint: disable=W0703,C0302,C0103,no-member
44+
# pylint: disable=W0703,C0302,C0103,no-member
4445
mlogger = logger.get_logger(__name__)
4546

4647
# Build strategy constant (Roslyn is the only supported strategy)
@@ -279,25 +280,25 @@ def _new_session_csharp():
279280
except Exception:
280281
# Some assemblies might not have accessible location/name
281282
continue
282-
283+
283284
if not loader_app_type:
284285
mlogger.error('PyRevitLoaderApplication not found in loaded assemblies')
285286
mlogger.info('Falling back to Python session creation...')
286287
_new_session()
287288
return
288-
289+
289290
# Get the LoadSession method
290291
load_session_method = loader_app_type.GetMethod('LoadSession')
291292
if not load_session_method:
292293
mlogger.error('LoadSession method not found in PyRevitLoaderApplication')
293294
mlogger.info('Falling back to Python session creation...')
294295
_new_session()
295296
return
296-
297+
297298
# Call the LoadSession method with logger and build strategy
298299
mlogger.info('Loading session using C# LoadSession method...')
299300
result = load_session_method.Invoke(None, framework.Array[object]([mlogger, build_strategy]))
300-
301+
301302
# Check if the result indicates success (Result.Succeeded = 0)
302303
if hasattr(result, 'value__') and result.value__ == 0:
303304
mlogger.info('C# session loading completed successfully')
@@ -316,7 +317,7 @@ def _new_session_csharp():
316317
mlogger.error('C# session loading returned failure result')
317318
mlogger.info('Falling back to Python session creation...')
318319
_new_session()
319-
320+
320321
except Exception as cs_ex:
321322
mlogger.error('Error in C# session creation: %s', cs_ex)
322323
mlogger.info('Falling back to Python session creation...')

0 commit comments

Comments
 (0)