Skip to content

Commit 32f2692

Browse files
committed
Enforce "No blank line after function docstring"
1 parent 73da595 commit 32f2692

5 files changed

Lines changed: 11 additions & 5 deletions

File tree

datalab/env.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ def xmlrpcport(self, value: int):
330330

331331
def parse_args(self):
332332
"""Parse command line arguments"""
333-
334333
# <!> WARNING <!>
335334
# Do not add an option '-c' to avoid any conflict with macro command
336335
# execution mecanism used with DataLab standalone version (see start.pyw)

datalab/gui/objectview.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ def dragMoveEvent(self, event: QG.QDragMoveEvent) -> None:
414414

415415
def __is_drop_allowed(self, event: QG.QDropEvent | QG.QDragMoveEvent) -> bool:
416416
"""Return True if drop is allowed"""
417-
418417
# Yes, this method has too many return statements.
419418
# But it's still quite readable, so let's focus on other things and just disable
420419
# the pylint warning.

datalab/utils/qthelpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def __init__(self, callback: Callable, **kwargs) -> None:
246246

247247
def run(self) -> None:
248248
"""Start thread"""
249-
250249
# Initialize progress bar: setting progress to 0.0 has the effect of
251250
# showing the progress dialog after the `minimumDuration` time has elapsed.
252251
# If we don't set the progress to 0.0, the progress dialog will be shown only

datalab/widgets/fitdialog.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ def doubleexponential_fit(x: np.ndarray, y: np.ndarray, parent=None, name=None):
611611
612612
Returns (yfit, params), where yfit is the fitted curve and params are
613613
the fitting parameters"""
614-
615614
# Get initial parameter estimates from Sigima DoubleExponentialFitComputer
616615
computer = fitting.DoubleExponentialFitComputer(x, y)
617616
initial_params = computer.compute_initial_params()

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,14 @@ target-version = "py39" # Assume Python 3.9.
130130

131131
[tool.ruff.lint]
132132
# all rules can be found here: https://beta.ruff.rs/docs/rules/
133-
select = ["E", "F", "W", "I", "NPY201"]
133+
select = [
134+
"D202", # Pydocstyle
135+
"E", # Pycodestyle error
136+
"F", # Pyflakes
137+
"I", # Isort
138+
"NPY201", # Numpy-specific checks
139+
"W" # Pycodestyle warning
140+
]
134141
ignore = [
135142
"E203", # space before : (needed for how black formats slicing)
136143
]
@@ -143,3 +150,6 @@ line-ending = "auto" # Like Black, automatically detect the appropr
143150

144151
[tool.ruff.lint.per-file-ignores]
145152
"doc/*" = ["E402"]
153+
154+
[tool.ruff.lint.pydocstyle]
155+
convention = "google"

0 commit comments

Comments
 (0)