-
Notifications
You must be signed in to change notification settings - Fork 1
Add OPC UA interface, device, init, and states #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
from ..lewis_versions import LEWIS_LATEST | ||
from .device import SimulatedFinsPLC | ||
|
||
framework_version = LEWIS_LATEST |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the issue, we need to either:
- Rename the variable to indicate that it is intentionally unused (e.g.,
_unused_framework_version
), or - Remove the assignment entirely if it is not needed.
Since there is no indication that the variable is intentionally unused or required for documentation purposes, the best approach is to remove the assignment entirely. This ensures the code remains clean and avoids confusion about the purpose of the variable.
-
Copy modified line R4
@@ -3,3 +3,3 @@ | ||
|
||
framework_version = LEWIS_LATEST | ||
|
||
__all__ = ["SimulatedFinsPLC"] |
from collections import OrderedDict | ||
|
||
from lewis.devices import StateMachineDevice | ||
from lewis.core.statemachine import State |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the problem, we will remove the unused import statement from lewis.core.statemachine import State
on line 4. This will eliminate the unnecessary dependency and improve code readability. No other changes are required, as the removal of this import does not affect the functionality of the code.
-
Copy modified line R4
@@ -3,3 +3,3 @@ | ||
from lewis.devices import StateMachineDevice | ||
from lewis.core.statemachine import State | ||
|
||
|
from lewis.devices import StateMachineDevice | ||
from lewis.core.statemachine import State | ||
|
||
from .states import DefaultState |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the problem, we will remove the unused import statement from .states import DefaultState
from the file lewis_emulators/opcua/device.py
. This will clean up the code and eliminate the unnecessary dependency.
-
Copy modified line R6
@@ -5,3 +5,3 @@ | ||
|
||
from .states import DefaultState | ||
|
||
|
@@ -0,0 +1,54 @@ | |||
from lewis.adapters import opcua |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the issue, the unused import statement from lewis.adapters import opcua
on line 1 should be removed. This will eliminate the unnecessary dependency and improve the clarity of the code. No other changes are required, as the removal of this import does not affect the functionality of the program.
@@ -1,2 +1 @@ | ||
from lewis.adapters import opcua | ||
|
The goal is to have format similar to the |
Initial commit and skeletal structure of files needed for OPC UA lewis emulator.