Skip to content

Commit b39a994

Browse files
committed
Replace "infos" with "info" across the codebase for proper English usage
1 parent 686dd29 commit b39a994

12 files changed

Lines changed: 42 additions & 42 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var/
5252

5353
# PyInstaller
5454
# Usually these files are written by a python script from a template
55-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
55+
# before PyInstaller builds the exe, so as to inject date/other info into it.
5656
*.manifest
5757
# *.spec
5858

cdl/baseproxy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def delete_metadata(
362362
"""
363363

364364
@abc.abstractmethod
365-
def get_group_titles_with_object_infos(
365+
def get_group_titles_with_object_info(
366366
self,
367367
) -> tuple[list[str], list[list[str]], list[list[str]]]:
368368
"""Return groups titles and lists of inner objects uuids and titles.
@@ -707,15 +707,15 @@ def delete_metadata(
707707
"""
708708
self._cdl.delete_metadata(refresh_plot, keep_roi)
709709

710-
def get_group_titles_with_object_infos(
710+
def get_group_titles_with_object_info(
711711
self,
712712
) -> tuple[list[str], list[list[str]], list[list[str]]]:
713713
"""Return groups titles and lists of inner objects uuids and titles.
714714
715715
Returns:
716716
Tuple: groups titles, lists of inner objects uuids and titles
717717
"""
718-
return self._cdl.get_group_titles_with_object_infos()
718+
return self._cdl.get_group_titles_with_object_info()
719719

720720
def get_object_titles(self, panel: str | None = None) -> list[str]:
721721
"""Get object (signal/image) list for current panel.

cdl/gui/docks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def get_more_image_stats(
149149
y1: float,
150150
) -> str:
151151
"""Return formatted string with stats on image rectangular area
152-
(output should be compatible with AnnotatedShape.get_infos)
152+
(output should be compatible with AnnotatedShape.get_info)
153153
154154
Args:
155155
item: image item
@@ -160,7 +160,7 @@ def get_more_image_stats(
160160
"""
161161
with warnings.catch_warnings():
162162
warnings.simplefilter("ignore", UserWarning)
163-
infos = get_image_stats(item, x0, y0, x1, y1)
163+
info = get_image_stats(item, x0, y0, x1, y1)
164164

165165
ix0, iy0, ix1, iy1 = item.get_closest_index_rect(x0, y0, x1, y1)
166166
data = item.data[iy0:iy1, ix0:ix1]
@@ -169,32 +169,32 @@ def get_more_image_stats(
169169

170170
integral = np.nansum(data)
171171
integral_fmt = r"%.3e " + zunit
172-
infos += f"<br>∑ = {integral_fmt % integral}"
172+
info += f"<br>∑ = {integral_fmt % integral}"
173173

174174
if xunit == yunit:
175175
surfacefmt = p.xformat.split()[0] + " " + xunit
176176
if xunit != "":
177177
surfacefmt = surfacefmt + "²"
178178
surface = abs((x1 - x0) * (y1 - y0))
179-
infos += f"<br>A = {surfacefmt % surface}"
179+
info += f"<br>A = {surfacefmt % surface}"
180180
if xunit is not None and zunit is not None:
181181
if surface != 0:
182182
density = integral / surface
183183
densityfmt = r"%.3e"
184184
if xunit and zunit:
185185
densityfmt += " " + zunit + "/" + xunit + "²"
186-
infos = infos + f"<br>ρ = {densityfmt % density}"
186+
info = info + f"<br>ρ = {densityfmt % density}"
187187

188188
c_i, c_j = get_centroid_fourier(data)
189189
c_x, c_y = item.get_plot_coordinates(c_j + ix0, c_i + iy0)
190-
infos += "<br>" + "<br>".join(
190+
info += "<br>" + "<br>".join(
191191
[
192192
"C|x = " + p.xformat % c_x,
193193
"C|y = " + p.yformat % c_y,
194194
]
195195
)
196196

197-
return infos
197+
return info
198198

199199

200200
def profile_to_signal(plot: BasePlot, panel: XCrossSection | YCrossSection) -> None:

cdl/gui/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def __get_datapanel(self, panel: str | None) -> BaseDataPanel:
237237
raise ValueError(f"Unknown panel: {panel}")
238238

239239
@remote_controlled
240-
def get_group_titles_with_object_infos(
240+
def get_group_titles_with_object_info(
241241
self,
242242
) -> tuple[list[str], list[list[str]], list[list[str]]]:
243243
"""Return groups titles and lists of inner objects uuids and titles.
@@ -246,7 +246,7 @@ def get_group_titles_with_object_infos(
246246
Groups titles, lists of inner objects uuids and titles
247247
"""
248248
panel = self.__get_current_basedatapanel()
249-
return panel.objmodel.get_group_titles_with_object_infos()
249+
return panel.objmodel.get_group_titles_with_object_info()
250250

251251
@remote_controlled
252252
def get_object_titles(self, panel: str | None = None) -> list[str]:

cdl/objectmodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def get_object_ids(self, flatten: bool = True) -> list[str] | list[list[str]]:
468468
ids.append(group.get_object_ids())
469469
return ids
470470

471-
def get_group_titles_with_object_infos(
471+
def get_group_titles_with_object_info(
472472
self,
473473
) -> tuple[list[str], list[list[str]], list[list[str]]]:
474474
"""Return groups titles and lists of inner objects uuids and titles.

cdl/plugins.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
Plugins may also extends DataLab I/O features by providing new image or
1616
signal formats. To do so, they must provide a subclass of :class:`ImageFormatBase`
17-
or :class:`SignalFormatBase`, in which format infos are defined using the
17+
or :class:`SignalFormatBase`, in which format information is defined using the
1818
:class:`FormatInfo` class.
1919
"""
2020

@@ -100,8 +100,8 @@ def unregister_plugin(cls, plugin: PluginBase):
100100
execenv.log(cls, f"{len(cls._plugin_instances)} plugins left")
101101

102102
@classmethod
103-
def get_plugin_infos(cls, html: bool = True) -> str:
104-
"""Return plugin infos (names, versions, descriptions) in html format
103+
def get_plugin_info(cls, html: bool = True) -> str:
104+
"""Return plugin information (names, versions, descriptions) in html format
105105
106106
Args:
107107
html: return html formatted text (default: True)

cdl/remote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,15 @@ def calc(self, name: str, param_data: list[str] | None = None) -> bool:
545545
return True
546546

547547
@remote_call
548-
def get_group_titles_with_object_infos(
548+
def get_group_titles_with_object_info(
549549
self,
550550
) -> tuple[list[str], list[list[str]], list[list[str]]]:
551551
"""Return groups titles and lists of inner objects uuids and titles.
552552
553553
Returns:
554554
Groups titles, lists of inner objects uuids and titles
555555
"""
556-
return self.win.get_group_titles_with_object_infos()
556+
return self.win.get_group_titles_with_object_info()
557557

558558
@remote_call
559559
def get_object_titles(self, panel: str | None = None) -> list[str]:

cdl/tests/features/common/misc_app_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def __misc_unit_function(win: CDLMainWindow) -> None:
103103
execenv.print(win.get_object_titles())
104104

105105
# Get object titles with info:
106-
__print_test_result("Get group titles with object infos")
107-
execenv.print(win.get_group_titles_with_object_infos())
106+
__print_test_result("Get group titles with object info")
107+
execenv.print(win.get_group_titles_with_object_info())
108108

109109
# Pop up tab menu:
110110
__print_test_result("Pop up tab menu")

cdl/widgets/instconfviewer.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,41 +41,41 @@ def get_pip_list() -> str:
4141
return decode_fs_string(output)
4242

4343

44-
def get_install_infos() -> str:
44+
def get_install_info() -> str:
4545
"""Get DataLab installation informations
4646
4747
Returns:
4848
str: installation informations
4949
"""
5050
if IS_FROZEN:
5151
# Stand-alone version
52-
more_infos = "This is the Stand-alone version of DataLab"
52+
more_info = "This is the Stand-alone version of DataLab"
5353
else:
54-
more_infos = ""
54+
more_info = ""
5555
try:
5656
state = dephash.check_dependencies_hash(DATAPATH)
5757
bad_deps = [name for name in state if not state[name]]
5858
if bad_deps:
59-
more_infos += "Invalid dependencies: "
60-
more_infos += ", ".join(bad_deps)
59+
more_info += "Invalid dependencies: "
60+
more_info += ", ".join(bad_deps)
6161
else:
62-
more_infos += "Dependencies hash file: checked."
62+
more_info += "Dependencies hash file: checked."
6363
except IOError:
64-
more_infos += "Unable to open dependencies hash file."
65-
more_infos += os.linesep * 2
66-
more_infos += get_pip_list()
67-
infos = os.linesep.join(
64+
more_info += "Unable to open dependencies hash file."
65+
more_info += os.linesep * 2
66+
more_info += get_pip_list()
67+
info = os.linesep.join(
6868
[
6969
f"DataLab v{cdl.__version__}",
7070
"",
7171
f"Machine type: {platform.machine()}",
7272
f"Platform: {platform.platform()}",
7373
f"Python v{sys.version}",
7474
"",
75-
more_infos,
75+
more_info,
7676
]
7777
)
78-
return infos
78+
return info
7979

8080

8181
class InstallConfigViewerWindow(QW.QDialog):
@@ -88,14 +88,14 @@ def __init__(self, parent: QW.QWidget | None = None) -> None:
8888
self.setWindowIcon(get_icon("DataLab.svg"))
8989
self.tabs = QW.QTabWidget(self)
9090
uc_title, uc_contents = get_title_contents(Conf.get_filename())
91-
plugins_io_contents = PluginRegistry.get_plugin_infos(html=False)
91+
plugins_io_contents = PluginRegistry.get_plugin_info(html=False)
9292
for registry in (SignalIORegistry, ImageIORegistry):
9393
plugins_io_contents += os.linesep + ("_" * 80) + os.linesep * 2
94-
plugins_io_contents += registry.get_format_infos()
94+
plugins_io_contents += registry.get_format_info()
9595
for title, contents, tab_icon, tab_title in (
9696
(
9797
_("Installation configuration"),
98-
get_install_infos(),
98+
get_install_info(),
9999
get_icon("libre-toolbox.svg"),
100100
_("Installation configuration"),
101101
),

cdl/widgets/status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def update_status(self) -> None:
136136
else:
137137
text += "-"
138138
self.label.setText(text)
139-
self.setToolTip(PluginRegistry.get_plugin_infos())
139+
self.setToolTip(PluginRegistry.get_plugin_info())
140140

141141

142142
class XMLRPCStatus(BaseStatus):

0 commit comments

Comments
 (0)