ripple-down-rules 0.4.82__py3-none-any.whl → 0.4.83__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,11 @@ import ast
2
2
  import logging
3
3
  from _ast import AST
4
4
 
5
- from PyQt6.QtWidgets import QApplication
5
+ try:
6
+ from PyQt6.QtWidgets import QApplication
7
+ except ImportError:
8
+ QApplication = None
9
+
6
10
  from colorama import Fore, Style
7
11
  from pygments import highlight
8
12
  from pygments.formatters.terminal import TerminalFormatter
@@ -11,7 +15,7 @@ from typing_extensions import Optional, Tuple
11
15
 
12
16
  from ..datastructures.callable_expression import CallableExpression, parse_string_to_expression
13
17
  from ..datastructures.dataclasses import CaseQuery
14
- from ..datastructures.enums import PromptFor, InteractionMode
18
+ from ..datastructures.enums import PromptFor
15
19
  from .gui import RDRCaseViewer
16
20
  from .ipython_custom_shell import IPythonShell
17
21
  from ..utils import make_list
@@ -90,7 +94,7 @@ class UserPrompt:
90
94
  prompt_str = f"Give conditions on when can the rule be evaluated for:"
91
95
  case_query.scope.update({'case': case_query.case})
92
96
  shell = None
93
- if QApplication.instance() is None:
97
+ if self.viewer is None:
94
98
  prompt_str = self.construct_prompt_str_for_shell(case_query, prompt_for, prompt_str)
95
99
  shell = IPythonShell(header=prompt_str, prompt_for=prompt_for, case_query=case_query,
96
100
  code_to_modify=code_to_modify)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ripple_down_rules
3
- Version: 0.4.82
3
+ Version: 0.4.83
4
4
  Summary: Implements the various versions of Ripple Down Rules (RDR) for knowledge representation and reasoning.
5
5
  Author-email: Abdelrhman Bassiouny <abassiou@uni-bremen.de>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -16,10 +16,10 @@ ripple_down_rules/user_interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
16
16
  ripple_down_rules/user_interface/gui.py,sha256=mzkyFs0Z7iS22WpPnCwT7HVQYkB72fy8EifXTTYLEf4,27917
17
17
  ripple_down_rules/user_interface/ipython_custom_shell.py,sha256=XS3URpfoGCYA__fKOo2AmJ7wQerp7UXKdhdDKiL5gDY,6537
18
18
  ripple_down_rules/user_interface/object_diagram.py,sha256=84JlEH0nQmtGmP8Su5iRX3ZfqByYHbVwd0BQYYPuckY,4436
19
- ripple_down_rules/user_interface/prompt.py,sha256=97s5mhmsqrFTQkfmHssYFko0SPLBDxesHoLumqZO0FA,8028
19
+ ripple_down_rules/user_interface/prompt.py,sha256=9QViZOL8kfwSKXb6A_Fr9hkGGgKg12tdFOizvAN0N-4,8053
20
20
  ripple_down_rules/user_interface/template_file_creator.py,sha256=-0L0jGW1VTrL0aer67mIdjFr3gKjXKA6zRZ5IXbY5vY,13959
21
- ripple_down_rules-0.4.82.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
22
- ripple_down_rules-0.4.82.dist-info/METADATA,sha256=wf_jJCvujpj9b4QjSx_BtmSPODRwKWsXGGhMOwyF3uY,43218
23
- ripple_down_rules-0.4.82.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
24
- ripple_down_rules-0.4.82.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
25
- ripple_down_rules-0.4.82.dist-info/RECORD,,
21
+ ripple_down_rules-0.4.83.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
22
+ ripple_down_rules-0.4.83.dist-info/METADATA,sha256=GE3bwcxMmoJd2cOUoGOTD2w3DnQiJzsF6xR64aUuEEo,43218
23
+ ripple_down_rules-0.4.83.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
24
+ ripple_down_rules-0.4.83.dist-info/top_level.txt,sha256=VeoLhEhyK46M1OHwoPbCQLI1EifLjChqGzhQ6WEUqeM,18
25
+ ripple_down_rules-0.4.83.dist-info/RECORD,,