Skip to content

Commit 4ce2c23

Browse files
authored
Introduce check for special characters (#92)
* Configure ruff to check for ambiguous unicode characters * Replace ambiguous unicode characters
1 parent b2a4205 commit 4ce2c23

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

backend/ibex/core/data_manipulation_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class DataManipulationMethodsResponse(BaseModel):
135135
AdditionalParameter(
136136
name="savgol_smoothing_window_length",
137137
human_readable_name="Window length",
138-
description="The length of the filter window (i.e., the number of coefficients). If mode is interp, window_length must be less than or equal to the size of x.",
138+
description="The length of the filter window (i.e., the number of coefficients). If mode is `interp`, window_length must be less than or equal to the size of x.",
139139
),
140140
AdditionalParameter(
141141
name="savgol_smoothing_polyorder",
@@ -161,7 +161,7 @@ class DataManipulationMethodsResponse(BaseModel):
161161
AdditionalParameter(
162162
name="savgol_smoothing_cval",
163163
human_readable_name="C-Val",
164-
description="Value to fill past the edges of the input if mode is constant. Default is 0.0.",
164+
description="Value to fill past the edges of the input if mode is `constant`. Default is 0.0.",
165165
),
166166
],
167167
),

backend/ibex/data_source/imas_python_source_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def apply_savgol_filter(
4646
"""
4747
Apply Savitzky-Golay filer to data
4848
:param data: The input array.
49-
:param window_length: The length of the filter window (i.e., the number of coefficients). If mode is interp, window_length must be less than or equal to the size of x.
49+
:param window_length: The length of the filter window (i.e., the number of coefficients). If mode is `interp`, window_length must be less than or equal to the size of x.
5050
:param polyorder: The order of the polynomial used to fit the samples. polyorder must be less than window_length.
5151
:param deriv: The order of the derivative to compute. This must be a nonnegative integer. The default is 0, which means to filter the data without differentiating.
5252
:param delta: The spacing of the samples to which the filter will be applied. This is only used if deriv > 0. Default is 1.0.
53-
:param mode: Must be mirror’, ‘constant’, ‘nearest’, ‘wrap or interp.
54-
:param cval: Value to fill past the edges of the input if mode is constant. Default is 0.0.
53+
:param mode: Must be `mirror`, `constant`, `nearest`, `wrap` or `interp`.
54+
:param cval: Value to fill past the edges of the input if mode is `constant`. Default is 0.0.
5555
5656
:return: Data with filter applied
5757
"""

backend/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ search_parent_directories = true
109109
line-length = 120
110110
exclude = ["venv", "_version.py"]
111111

112+
[tool.ruff.lint]
113+
extend-select = ["RUF001", "RUF002", "RUF003"]
114+
112115
[tool.coverage.run]
113116
omit = [
114117
"ibex/_version.py",

0 commit comments

Comments
 (0)