Skip to content

Commit

Permalink
Fixes incorrect regex in pylint config
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenNneji committed Nov 18, 2021
1 parent e49b09f commit bbda07a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ disable = all
enable = C0112, C0103, C0115, W0611, W0612, W1309
max-line-length = 120
good-names-rgxs = ^[_a-z][_a-z0-9]?$
method-rgx=(?P<camelCase>^_*[a-z]+([A-Z][a-z0-9]+)*_*)
method-rgx=(?P<camelCase>^_*[a-z]+([A-Z][a-zA-Z0-9]+)*_*$)
argument-naming-style=snake_case
attr-naming-style=snake_case
class-attribute-naming-style=snake_case
Expand Down
12 changes: 6 additions & 6 deletions sscanss/app/dialogs/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def __init__(self, sample, parent):
self.move_combobox = QtWidgets.QComboBox()
self.move_combobox.setView(QtWidgets.QListView())
self.move_combobox.addItems([option.value for option in MoveOriginTool.MoveOptions])
self.move_combobox.currentTextChanged.connect(self.move_options)
self.move_combobox.currentTextChanged.connect(self.setMoveOptions)
self.main_layout.addWidget(label)
self.main_layout.addWidget(self.move_combobox)
self.main_layout.addSpacing(5)
Expand All @@ -384,7 +384,7 @@ def __init__(self, sample, parent):
self.ignore_combobox = QtWidgets.QComboBox()
self.ignore_combobox.setView(QtWidgets.QListView())
self.ignore_combobox.addItems([option.value for option in MoveOriginTool.IgnoreOptions])
self.ignore_combobox.currentTextChanged.connect(self.ignore_options)
self.ignore_combobox.currentTextChanged.connect(self.setIgnoreOptions)
self.main_layout.addWidget(label)
self.main_layout.addWidget(self.ignore_combobox)
self.main_layout.addSpacing(5)
Expand All @@ -399,7 +399,7 @@ def __init__(self, sample, parent):
self.setLayout(self.main_layout)

self.selected_sample = sample
self.ignore_options(self.ignore_combobox.currentText())
self.setIgnoreOptions(self.ignore_combobox.currentText())

@property
def selected_sample(self):
Expand All @@ -424,10 +424,10 @@ def selected_sample(self, value):
self.bounding_box = BoundingBox.merge([s.bounding_box for s in sample.values()])
else:
self.bounding_box = self.parent.presenter.model.sample[value].bounding_box
self.move_options(self.move_combobox.currentText())
self.setMoveOptions(self.move_combobox.currentText())
self.execute_button.setEnabled(True)

def move_options(self, text):
def setMoveOptions(self, text):
"""Sets the move option of the tool
:param text: MoveOptions
Expand All @@ -444,7 +444,7 @@ def move_options(self, text):
else:
self.move_to = self.bounding_box.max

def ignore_options(self, text):
def setIgnoreOptions(self, text):
"""Sets the ignore option of the tool
:param text: IgnoreOptions
Expand Down

0 comments on commit bbda07a

Please sign in to comment.