Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

anna

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anna - npm Package Compare versions

Comparing version
0.4.1
to
0.5
+1
-1
anna.egg-info/PKG-INFO
Metadata-Version: 1.1
Name: anna
Version: 0.4.1
Version: 0.5
Summary: A Neat configuratioN Auxiliary

@@ -5,0 +5,0 @@ Home-page: https://gitlab.com/Dominik1123/Anna

@@ -1088,2 +1088,76 @@ # -*- coding: utf-8 -*-

class FilepathVectorInput(ParameterInput):
PEER = None
def __init__(self, parameter, parent=None):
super(FilepathVectorInput, self).__init__(parameter, parent)
self._filepath_inputs = []
self._new_filepath_button = Widgets.QPushButton(QtGui.QIcon.fromTheme('list-add'), '')
self._container_layout = Widgets.QVBoxLayout()
self._container_layout.addWidget(self._new_filepath_button)
self._container_layout.addStretch(1)
h_layout = Widgets.QHBoxLayout()
v_layout_label = Widgets.QVBoxLayout()
v_layout_label.addWidget(Widgets.QLabel(parameter.name))
v_layout_label.addStretch(1)
h_layout.addLayout(v_layout_label, 0)
h_layout.addLayout(self._container_layout, 1)
self.setLayout(h_layout)
self._add_new_input_field()
self._new_filepath_button.clicked.connect(lambda: (self._add_new_input_field(), self.setFocus()))
@property
def text(self):
text_repr = six.text_type(',').join(x.text for x in self._filepath_inputs if x.text).strip()
if not text_repr:
return text_repr
return '[' + text_repr + ']'
@text.setter
def text(self, value):
if value.startswith('['):
value = value[1:]
if value.endswith(']'):
value = value[:-1]
values = value.strip().split(',')
for widget in self._filepath_inputs:
self._container_layout.removeWidget(widget)
widget.hide()
self._filepath_inputs.clear()
for value in values:
field = self._add_new_input_field()
field.text = value.strip()
def _add_new_input_field(self):
field = FilepathInput(parameters.FilepathParameter('File {}'.format(len(self._filepath_inputs) + 1)))
self._container_layout.insertWidget(len(self._filepath_inputs), field)
self._filepath_inputs.append(field)
return field
# noinspection PyMethodOverriding,PyPep8Naming
def setFocus(self):
super(FilepathVectorInput, self).setFocus()
self._filepath_inputs[-1].setFocus()
class FilepathDupletInput(FilepathVectorInput):
def __init__(self, parameter, parent=None):
super(FilepathDupletInput, self).__init__(parameter, parent)
self._add_new_input_field()
self._container_layout.removeWidget(self._new_filepath_button)
class FilepathTripletInput(FilepathVectorInput):
def __init__(self, parameter, parent=None):
super(FilepathTripletInput, self).__init__(parameter, parent)
self._add_new_input_field()
self._add_new_input_field()
self._container_layout.removeWidget(self._new_filepath_button)
class VectorInput(ParameterInput):

@@ -1287,2 +1361,4 @@ PEER = None

return PhysicalTripletInput(potential_wrapper)
elif issubclass(parameter._element_type, parameters.FilepathParameter):
return FilepathTripletInput(potential_wrapper)
else:

@@ -1293,2 +1369,4 @@ return TripletInput(potential_wrapper)

return PhysicalDupletInput(potential_wrapper)
elif issubclass(parameter._element_type, parameters.FilepathParameter):
return FilepathDupletInput(potential_wrapper)
else:

@@ -1299,2 +1377,4 @@ return DupletInput(potential_wrapper)

return PhysicalVectorQuantityInput(potential_wrapper)
elif issubclass(parameter._element_type, parameters.FilepathParameter):
return FilepathVectorInput(potential_wrapper)
else:

@@ -1301,0 +1381,0 @@ return VectorInput(potential_wrapper)

@@ -1,1 +0,1 @@

0.4.1
0.5
Metadata-Version: 1.1
Name: anna
Version: 0.4.1
Version: 0.5
Summary: A Neat configuratioN Auxiliary

@@ -5,0 +5,0 @@ Home-page: https://gitlab.com/Dominik1123/Anna