Conversation
| UnableToConnectToPVException, | ||
| ) | ||
| from genie_python.genie_cachannel_wrapper import EXIST_TIMEOUT, CaChannelWrapper | ||
| from genie_python.genie_cachannel_wrapper import AlarmCondition as AlarmStatus # noqa: F401 |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the problem, simply delete the unused import statement:
- In general, unused imports should be removed to clean up the code and avoid unnecessary dependencies.
- The best way to fix this is to delete line 32:
from genie_python.genie_cachannel_wrapper import AlarmCondition as AlarmStatus # noqa: F401. - No other code change is required, as the alias
AlarmStatusis not used elsewhere in the provided snippet. - Make no other modifications to imports or code.
| @@ -29,7 +29,6 @@ | ||
| UnableToConnectToPVException, | ||
| ) | ||
| from genie_python.genie_cachannel_wrapper import EXIST_TIMEOUT, CaChannelWrapper | ||
| from genie_python.genie_cachannel_wrapper import AlarmCondition as AlarmStatus # noqa: F401 | ||
| from genie_python.genie_cachannel_wrapper import AlarmSeverity # noqa: F401 | ||
|
|
||
|
|
| ) | ||
| from genie_python.genie_cachannel_wrapper import EXIST_TIMEOUT, CaChannelWrapper | ||
| from genie_python.genie_cachannel_wrapper import AlarmCondition as AlarmStatus # noqa: F401 | ||
| from genie_python.genie_cachannel_wrapper import AlarmSeverity # noqa: F401 |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the problem, remove the unused import of AlarmSeverity from the file src/server_common/channel_access.py. Specifically, delete line 33, which reads from genie_python.genie_cachannel_wrapper import AlarmSeverity # noqa: F401. This change will not affect existing functionality, as there are no references to AlarmSeverity in the provided code.
| @@ -30,7 +30,6 @@ | ||
| ) | ||
| from genie_python.genie_cachannel_wrapper import EXIST_TIMEOUT, CaChannelWrapper | ||
| from genie_python.genie_cachannel_wrapper import AlarmCondition as AlarmStatus # noqa: F401 | ||
| from genie_python.genie_cachannel_wrapper import AlarmSeverity # noqa: F401 | ||
|
|
||
|
|
||
| def _create_caput_pool() -> ThreadPoolExecutor: |
some breaking changes here:
motor_in_set_mode()removed from helpers - see use genie python's motor_in_set_mode EPICS-inst_servers#448 and use genie_python's motor_in_set_mode as server_common just passes it through anyway EPICS-refl#89moved
register_ioc_startfromhelperstoioc_startup- we need to be careful about this one