Skip to content

Conversation

rerpha
Copy link
Contributor

@rerpha rerpha commented Oct 16, 2025

some breaking changes here:

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

Import of 'AlarmStatus' is not used.

Copilot Autofix

AI 8 days 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 AlarmStatus is not used elsewhere in the provided snippet.
  • Make no other modifications to imports or code.

Suggested changeset 1
src/server_common/channel_access.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/server_common/channel_access.py b/src/server_common/channel_access.py
--- a/src/server_common/channel_access.py
+++ b/src/server_common/channel_access.py
@@ -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
 
 
EOF
@@ -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


Copilot is powered by AI and may make mistakes. Always verify output.
)
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

Import of 'AlarmSeverity' is not used.

Copilot Autofix

AI 8 days 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.

Suggested changeset 1
src/server_common/channel_access.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/server_common/channel_access.py b/src/server_common/channel_access.py
--- a/src/server_common/channel_access.py
+++ b/src/server_common/channel_access.py
@@ -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:
EOF
@@ -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:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant