From 239b9a15bbf4e729380ed0290b08fa7c0c939f48 Mon Sep 17 00:00:00 2001
From: codeboss <2422523675@qq.com>
Date: Sat, 3 Aug 2024 10:15:15 +0800
Subject: [PATCH] update
---
.../inspectionProfiles/profiles_settings.xml | 1 +
.idea/workspace.xml | 63 ++++++++++---------
.pylintrc | 2 +
entry.py | 2 +-
frame/CompareViews.py | 29 ++++++---
frame/ReferView.py | 2 +-
graph/directed_acyclic_graph/DAGLayout.py | 2 +-
7 files changed, 58 insertions(+), 43 deletions(-)
create mode 100644 .pylintrc
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
index 105ce2d..dd4c951 100644
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -1,5 +1,6 @@
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 68b92dd..16f7640 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,11 +5,10 @@
+
-
-
-
-
+
+
@@ -37,33 +36,34 @@
- {
+ "keyToString": {
+ "ASKED_ADD_EXTERNAL_FILES": "true",
+ "Python.CompareViews.executor": "Run",
+ "Python.CompareWindow.executor": "Run",
+ "Python.ContentView.executor": "Run",
+ "Python.DAGGraph (1).executor": "Run",
+ "Python.DAGGraph.executor": "Run",
+ "Python.DAGLayout (1).executor": "Run",
+ "Python.DAGLayout.executor": "Run",
+ "Python.DAGPresent.executor": "Run",
+ "Python.MergeView.executor": "Run",
+ "Python.MileStone.executor": "Run",
+ "Python.NovelManage.executor": "Debug",
+ "Python.ReferView.executor": "Run",
+ "Python.StoryMap.executor": "Run",
+ "Python.UDGLayout.executor": "Run",
+ "Python.UDGPresent.executor": "Run",
+ "Python.ast_load.executor": "Debug",
+ "Python.entry.executor": "Run",
+ "Python.test.executor": "Run",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "master",
+ "last_opened_file_path": "D:/Projects/Python/StoryTools",
+ "settings.editor.selected.configurable": "preferences.lookFeel"
}
-}]]>
+}
@@ -219,6 +219,9 @@
+
+
+
diff --git a/.pylintrc b/.pylintrc
new file mode 100644
index 0000000..ff4e4dd
--- /dev/null
+++ b/.pylintrc
@@ -0,0 +1,2 @@
+extension-pkg-whitelist=PyQt5
+
diff --git a/entry.py b/entry.py
index 9ca187c..7bfcdea 100644
--- a/entry.py
+++ b/entry.py
@@ -1 +1 @@
-print(__file__)
\ No newline at end of file
+print(__file__)
diff --git a/frame/CompareViews.py b/frame/CompareViews.py
index f86fb16..24155c2 100644
--- a/frame/CompareViews.py
+++ b/frame/CompareViews.py
@@ -1,8 +1,15 @@
-import sys, os
+"""
+CompareViews:
+对比Storylines基线和最新Storylines编译结果差异对比
+"""
+
+import sys
+import os
from typing import List, Dict, Tuple
from PyQt5.QtCore import QModelIndex
from PyQt5.QtGui import QStandardItemModel, QStandardItem
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QTableView, QSplitter, QApplication, QMainWindow
+
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from frame.MergeView import LinesMergeView, MergeDestination
from manage.MileStone import base_store_path, current_store_path
@@ -20,7 +27,7 @@ class ResultList(QTableView):
self.setSelectionBehavior(QTableView.SelectionBehavior.SelectRows)
pass
- def present_affected_fragments(self,graph_new: Dict[str, StoryMap], cmp_result: Dict[ModifyReason, List[FragmentSlice]]):
+ def present_affected_fragments(self, graph_new: Dict[str, StoryMap], cmp_result: Dict[ModifyReason, List[FragmentSlice]]):
"""
展示影响节点
:return:
@@ -101,7 +108,7 @@ class ResultList(QTableView):
return retvs
- def __filter_and_related_defines_seek(self, affect_directed: List[FragmentSlice])-> List[Tuple[str, str]]:
+ def __filter_and_related_defines_seek(self, affect_directed: List[FragmentSlice]) -> List[Tuple[str, str]]:
story_fragment_names: Dict[str, Tuple[str, str]] = {}
for node in affect_directed:
# 情节定义节点
@@ -118,13 +125,15 @@ class ResultList(QTableView):
return list(story_fragment_names.values())
- def __append_fragments_list(self, fragment_keys: List[Tuple[str, str]], type: str) -> None:
+ def __append_fragments_list(self, fragment_keys: List[Tuple[str, str]], comp_type: str) -> None:
for key_def in fragment_keys:
- row = []
- row.append(QStandardItem(key_def[0]))
- row.append(QStandardItem(key_def[1]))
- row.append(QStandardItem(type))
- for cell in row: cell.setEditable(False)
+ row = [
+ QStandardItem(key_def[0]),
+ QStandardItem(key_def[1]),
+ QStandardItem(comp_type)
+ ]
+ for cell in row:
+ cell.setEditable(False)
self.model.appendRow(row)
pass
pass
@@ -193,4 +202,4 @@ if __name__ == "__main__":
win.setCentralWidget(view)
win.show()
- app.exec()
\ No newline at end of file
+ app.exec()
diff --git a/frame/ReferView.py b/frame/ReferView.py
index 0262cd7..2d4c7e7 100644
--- a/frame/ReferView.py
+++ b/frame/ReferView.py
@@ -1,7 +1,7 @@
from PyQt5.QtWidgets import QTextEdit, QWidget, QSplitter, QVBoxLayout, QApplication
from PyQt5.Qt import Qt
from abc import abstractmethod
-from typing import List
+from typing import List, Protocol
import sys
diff --git a/graph/directed_acyclic_graph/DAGLayout.py b/graph/directed_acyclic_graph/DAGLayout.py
index 9cafcb5..5d8a31e 100644
--- a/graph/directed_acyclic_graph/DAGLayout.py
+++ b/graph/directed_acyclic_graph/DAGLayout.py
@@ -1,6 +1,6 @@
+from math import floor,ceil
from graph.DataType import Point, Arrow
from typing import List, Dict, Tuple
-from math import floor,ceil
class DAGLayerHelper: