aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/conventionalrp/extractors
diff options
context:
space:
mode:
authorHsiangNianian <i@jyunko.cn>2025-03-15 16:35:39 +0800
committerHsiangNianian <i@jyunko.cn>2025-03-15 16:35:39 +0800
commit965771fb0d85ddb27dc6c5dd7df822d1fb318286 (patch)
treef33a0d36e5716da13be0e3a4134cf7359ebe5223 /src/conventionalrp/extractors
parent818d84a7bf00c07b7ab252dda5bfa70a98b8be65 (diff)
downloadconventional_role_play-965771fb0d85ddb27dc6c5dd7df822d1fb318286.tar.gz
conventional_role_play-965771fb0d85ddb27dc6c5dd7df822d1fb318286.zip
refactor: clean up code formatting and add new PluginManager class
Diffstat (limited to 'src/conventionalrp/extractors')
-rw-r--r--src/conventionalrp/extractors/__init__.py2
-rw-r--r--src/conventionalrp/extractors/base.py2
-rw-r--r--src/conventionalrp/extractors/rule_extractor.py5
3 files changed, 5 insertions, 4 deletions
diff --git a/src/conventionalrp/extractors/__init__.py b/src/conventionalrp/extractors/__init__.py
index c076f07..8606862 100644
--- a/src/conventionalrp/extractors/__init__.py
+++ b/src/conventionalrp/extractors/__init__.py
@@ -1,4 +1,4 @@
# FILE: /trpg-log-processor/trpg-log-processor/src/conventionalrp/extractors/__init__.py
"""
This file initializes the extractors module.
-""" \ No newline at end of file
+"""
diff --git a/src/conventionalrp/extractors/base.py b/src/conventionalrp/extractors/base.py
index fc42f29..bc3c41f 100644
--- a/src/conventionalrp/extractors/base.py
+++ b/src/conventionalrp/extractors/base.py
@@ -6,4 +6,4 @@ class BaseExtractor:
raise NotImplementedError("Subclasses should implement this method.")
def load_rules(self, rules_source):
- raise NotImplementedError("Subclasses should implement this method.") \ No newline at end of file
+ raise NotImplementedError("Subclasses should implement this method.")
diff --git a/src/conventionalrp/extractors/rule_extractor.py b/src/conventionalrp/extractors/rule_extractor.py
index 78e8505..b0d03d5 100644
--- a/src/conventionalrp/extractors/rule_extractor.py
+++ b/src/conventionalrp/extractors/rule_extractor.py
@@ -13,7 +13,8 @@ class RuleExtractor(BaseExtractor):
def load_rules_from_file(self):
import json
- with open(self.config_file, 'r') as file:
+
+ with open(self.config_file, "r") as file:
return json.load(file)
def extract(self):
@@ -21,4 +22,4 @@ class RuleExtractor(BaseExtractor):
extracted_rules = []
for rule in self.rules:
extracted_rules.append(rule) # Placeholder for actual extraction logic
- return extracted_rules \ No newline at end of file
+ return extracted_rules