[meld] filters: Make the class methods actually class methods
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] filters: Make the class methods actually class methods
- Date: Sat, 27 Oct 2018 22:06:54 +0000 (UTC)
commit 59f061a0c88e99e00fd9b2ca16819610cd7eb90b
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Oct 28 06:38:37 2018 +1000
filters: Make the class methods actually class methods
meld/filters.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/meld/filters.py b/meld/filters.py
index ab69b17d..8ec8ec32 100644
--- a/meld/filters.py
+++ b/meld/filters.py
@@ -82,19 +82,19 @@ class FilterEntry:
@classmethod
def compile_filter(cls, filter_string, filter_type):
- if filter_type == FilterEntry.REGEX:
- compiled = FilterEntry._compile_regex(filter_string)
- elif filter_type == FilterEntry.SHELL:
- compiled = FilterEntry._compile_shell_pattern(filter_string)
+ if filter_type == cls.REGEX:
+ compiled = cls._compile_regex(filter_string)
+ elif filter_type == cls.SHELL:
+ compiled = cls._compile_shell_pattern(filter_string)
else:
raise ValueError("Unknown filter type")
return compiled
@classmethod
def compile_byte_filter(cls, filter_string, filter_type):
- if filter_type == FilterEntry.REGEX:
- compiled = FilterEntry._compile_byte_regex(filter_string)
- elif filter_type == FilterEntry.SHELL:
+ if filter_type == cls.REGEX:
+ compiled = cls._compile_byte_regex(filter_string)
+ elif filter_type == cls.SHELL:
compiled = None
else:
raise ValueError("Unknown filter type")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]