Skip to content
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

add checker category PATCHER #852

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lyrebird/checker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
class ExtensionCategory:
MODIFIER = "Modifier"
CHECKER = "Checker"
PATCHER = "Patcher"
OTHER = "Other"

# TODO: For old version compatibility, need to delete
Expand All @@ -53,7 +54,7 @@ class ExtensionCategory:

@classmethod
def get_order(cls, category):
orders = [cls.MODIFIER, cls.EDITOR, cls.CHECKER, cls.OTHER, cls.DEFAULT]
orders = [cls.MODIFIER, cls.EDITOR, cls.CHECKER, cls.OTHER, cls.DEFAULT, cls.PATCHER]
if category not in orders:
return len(orders) + 1
return orders.index(category)
Expand All @@ -63,6 +64,7 @@ def get_description(cls, category):
descriptions = {
cls.MODIFIER: 'Modify flow',
cls.CHECKER: 'Check event and make notification',
cls.PATCHER: 'Dynamically add supplementary logic to Lyrebird',
cls.DEFAULT: 'Testability support, Advanced usage, etc.',

# TODO: For old version compatibility, need to delete
Expand Down
Loading