-
Notifications
You must be signed in to change notification settings - Fork 333
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
v2.0.1 Action enums corrected #580
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
55247e7
Enums Updates + change log
Jared-Newell-Mobility c471f83
test updated - not complete
Jared-Newell-Mobility 7002804
change log updated
Jared-Newell-Mobility d0957c4
modified members
Jared-Newell-Mobility 406808b
linting
Jared-Newell-Mobility 98c0392
linting
Jared-Newell-Mobility 8210bac
Merge branch 'master' into v2.0.1-Action-enums-corrected
OrangeTux 890f125
generalised warning included
Jared-Newell-Mobility 9a15177
Merge remote-tracking branch 'origin/v2.0.1-Action-enums-corrected' i…
Jared-Newell-Mobility 204a481
black'd
Jared-Newell-Mobility fea4add
linting
Jared-Newell-Mobility 9c291c9
Merge branch 'master' into v2.0.1-Action-enums-corrected
Jared-Newell-Mobility 7a54c9e
Merge branch 'master' into v2.0.1-Action-enums-corrected
Jared-Newell-Mobility 50e4a95
warning category introduced
Jared-Newell-Mobility 0d73a27
Merge remote-tracking branch 'origin/v2.0.1-Action-enums-corrected' i…
Jared-Newell-Mobility e8fbf78
updated change log
Jared-Newell-Mobility acba23f
updated change log
Jared-Newell-Mobility c0f0366
Merge branch 'master' into v2.0.1-Action-enums-corrected
Jared-Newell-Mobility File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from warnings import warn | ||
|
||
try: | ||
# breaking change introduced in python 3.11 | ||
from enum import StrEnum | ||
|
@@ -11,6 +13,14 @@ class StrEnum(str, Enum): # pragma: no cover | |
class Action(StrEnum): | ||
"""An Action is a required part of a Call message.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
warn( | ||
message="Action enum contains deprecated members and will be removed in " | ||
"the next major release, please use snake case members.", | ||
category=DeprecationWarning, | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you apply the comment I made here to this PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Satisfied with commit 50e4a95 |
||
|
||
# --------- Soon to be deprecated --------------------- | ||
Authorize = "Authorize" | ||
BootNotification = "BootNotification" | ||
CancelReservation = "CancelReservation" | ||
|
@@ -75,9 +85,72 @@ class Action(StrEnum): | |
UnlockConnector = "UnlockConnector" | ||
UnpublishFirmware = "UnpublishFirmware" | ||
UpdateFirmware = "UpdateFirmware" | ||
# -------------------------------------------------------- | ||
|
||
|
||
# Enums | ||
authorize = "Authorize" | ||
boot_notification = "BootNotification" | ||
cancel_reservation = "CancelReservation" | ||
certificate_signed = "CertificateSigned" | ||
change_availability = "ChangeAvailability" | ||
clear_cache = "ClearCache" | ||
clear_charging_profile = "ClearChargingProfile" | ||
clear_display_message = "ClearDisplayMessage" | ||
cleared_charging_limit = "ClearedChargingLimit" | ||
clear_variable_monitoring = "ClearVariableMonitoring" | ||
cost_update = "CostUpdate" | ||
customer_information = "CustomerInformation" | ||
data_transfer = "DataTransfer" | ||
delete_certificate = "DeleteCertificate" | ||
firmware_status_notification = "FirmwareStatusNotification" | ||
get_15118_ev_certificate = "Get15118EVCertificate" | ||
get_base_report = "GetBaseReport" | ||
get_certificate_status = "GetCertificateStatus" | ||
get_charging_profiles = "GetChargingProfiles" | ||
get_composite_schedule = "GetCompositeSchedule" | ||
get_display_messages = "GetDisplayMessages" | ||
get_installed_certificate_ids = "GetInstalledCertificateIds" | ||
get_local_list_version = "GetLocalListVersion" | ||
get_log = "GetLog" | ||
get_monitoring_report = "GetMonitoringReport" | ||
get_report = "GetReport" | ||
get_transaction_status = "GetTransactionStatus" | ||
get_variables = "GetVariables" | ||
heartbeat = "Heartbeat" | ||
install_certificate = "InstallCertificate" | ||
log_status_notification = "LogStatusNotification" | ||
meter_values = "MeterValues" | ||
notify_charging_limit = "NotifyChargingLimit" | ||
notify_customer_information = "NotifyCustomerInformation" | ||
notify_display_messages = "NotifyDisplayMessages" | ||
notify_ev_charging_needs = "NotifyEVChargingNeeds" | ||
notify_ev_charging_schedule = "NotifyEVChargingSchedule" | ||
notify_event = "NotifyEvent" | ||
notify_monitoring_report = "NotifyMonitoringReport" | ||
notify_report = "NotifyReport" | ||
publish_firmware = "PublishFirmware" | ||
publish_firmware_status_notification = "PublishFirmwareStatusNotification" | ||
report_charging_profiles = "ReportChargingProfiles" | ||
request_start_transaction = "RequestStartTransaction" | ||
request_stop_transaction = "RequestStopTransaction" | ||
reservation_status_update = "ReservationStatusUpdate" | ||
reserve_now = "ReserveNow" | ||
reset = "Reset" | ||
security_event_notification = "SecurityEventNotification" | ||
send_local_list = "SendLocalList" | ||
set_charging_profile = "SetChargingProfile" | ||
set_display_message = "SetDisplayMessage" | ||
set_monitoring_base = "SetMonitoringBase" | ||
set_monitoring_level = "SetMonitoringLevel" | ||
set_network_profile = "SetNetworkProfile" | ||
set_variable_monitoring = "SetVariableMonitoring" | ||
set_variables = "SetVariables" | ||
sign_certificate = "SignCertificate" | ||
status_notification = "StatusNotification" | ||
transaction_event = "TransactionEvent" | ||
trigger_message = "TriggerMessage" | ||
unlock_connector = "UnlockConnector" | ||
unpublish_firmware = "UnpublishFirmware" | ||
update_firmware = "UpdateFirmware" | ||
|
||
|
||
class APNAuthenticationType(StrEnum): | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not yet breaking, I suggest to change the title to "Deprecated".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Satisfied with commit acba23f