Sfoglia il codice sorgente

[DATALAD RUNCMD] run codespell throughout but ignore fail

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w || :",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
Yaroslav Halchenko 1 anno fa
parent
commit
02d4494930

+ 1 - 1
doc/gui/examples/charts/continuous-error-simple.py

@@ -25,7 +25,7 @@ samples = [5, 7, 8, 4, 5, 9, 8, 8, 6, 5]
 # Generate error data
 # Error that adds to the input data
 error_plus = [3 * random.random() + 0.5 for _ in x]
-# Error substracted from to the input data
+# Error subtracted from to the input data
 error_minus = [3 * random.random() + 0.5 for _ in x]
 
 # Upper bound (y + error_plus)

+ 1 - 1
doc/gui/examples/charts/histogram-binning-function.py

@@ -39,7 +39,7 @@ properties = {
     "options": [
         # First trace: count the bins
         {"histfunc": "count"},
-        # Second trace: sum the bin occurences
+        # Second trace: sum the bin occurrences
         {"histfunc": "sum"},
     ],
     # Set x axis name

+ 1 - 1
doc/gui/examples/charts/polar-tick-texts.py

@@ -33,7 +33,7 @@ def generate_hand_shapes():
 
     # Compute the angle that represents the minutes
     minutes_angle = 360 * ((minutes % 60) / 60 + (seconds % 60) / 60 / 60)
-    # Longer and slighly thinner hand for the minutes
+    # Longer and slightly thinner hand for the minutes
     minutes_hand = {"r": [0, 6, 8, 6, 0], "a": [0, minutes_angle - 4, minutes_angle, minutes_angle + 4, 0]}
 
     # Compute the angle that represents the seconds

+ 1 - 1
doc/gui/extension/example_library/front-end/webpack.config.js

@@ -52,7 +52,7 @@ module.exports = (_env, options) => {
 
     plugins: [
       new webpack.DllReferencePlugin({
-        // We assume the current directory is orignal directory in the taipy-gui repository.
+        // We assume the current directory is original directory in the taipy-gui repository.
         // If this file is moved, this path must be updated
         manifest: path.resolve(
           __dirname,

+ 1 - 1
frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx

@@ -183,7 +183,7 @@ const AutoLoadingTable = (props: TaipyTableProps) => {
         userData,
     } = props;
     const [rows, setRows] = useState<RowType[]>([]);
-    const [rowCount, setRowCount] = useState(1000); // need someting > 0 to bootstrap the infinit loader
+    const [rowCount, setRowCount] = useState(1000); // need something > 0 to bootstrap the infinite loader
     const dispatch = useDispatch();
     const page = useRef<key2Rows>({ key: defaultKey, promises: {} });
     const [orderBy, setOrderBy] = useState("");

+ 1 - 1
frontend/taipy-gui/src/components/Taipy/StatusList.tsx

@@ -47,7 +47,7 @@ const getStatusStrValue = (status: number) => {
         case 4:
             return "error";
         default:
-            return "unknwon";
+            return "unknown";
     }
 };
 

+ 2 - 2
frontend/taipy-gui/src/context/taipyReducers.spec.ts

@@ -58,10 +58,10 @@ describe("reducer", () => {
     it("set Menu", async () => {
         expect(taipyReducer({...INITIAL_STATE}, {type: "SET_MENU", menu: {}} as TaipyBaseAction).menu).toBeDefined();
     });
-    it("sets dowload", async () => {
+    it("sets download", async () => {
         expect(taipyReducer({...INITIAL_STATE}, {type: "DOWNLOAD_FILE", content: {}} as TaipyBaseAction).download).toBeDefined();
     });
-    it("resets dowload", async () => {
+    it("resets download", async () => {
         expect(taipyReducer({...INITIAL_STATE}, {type: "DOWNLOAD_FILE"} as TaipyBaseAction).download).toBeUndefined();
     });
     it("sets partial", async () => {

+ 2 - 2
frontend/taipy-gui/src/themes/stylekit.ts

@@ -168,7 +168,7 @@ export const stylekitModeThemes = {
       },
     },
     components: {
-      // Give popover paper a slighly lighter color to reflect superior elevation
+      // Give popover paper a slightly lighter color to reflect superior elevation
       MuiPopover: {
         styleOverrides: {
           paper: {
@@ -200,7 +200,7 @@ export const stylekitModeThemes = {
       },
     },
     components: {
-      // Give popover paper a slighly lighter color to reflect superior elevation
+      // Give popover paper a slightly lighter color to reflect superior elevation
       MuiPopover: {
         styleOverrides: {
           paper: {

+ 1 - 1
frontend/taipy-gui/src/workers/fileupload.worker.ts

@@ -87,7 +87,7 @@ const process = (files: FileList, uploadUrl: string, varName: string, id: string
         }
         self.postMessage({
             progress: 100,
-            message: uploadedFiles.join(", ") + " Uploaded Succesfully",
+            message: uploadedFiles.join(", ") + " Uploaded Successfully",
             done: true,
         } as FileUploadReturn);
     }

+ 2 - 2
frontend/taipy/src/DataNodeChart.tsx

@@ -285,8 +285,8 @@ const DataNodeChart = (props: DataNodeChartProps) => {
                 cfg
                     ? storeConf(configId, {
                           ...cfg,
-                          traces: (cfg.traces || []).map((axises, idx) =>
-                              idx == trace ? (axises.map((a, j) => (j == axis ? col : a)) as [string, string]) : axises
+                          traces: (cfg.traces || []).map((axes, idx) =>
+                              idx == trace ? (axes.map((a, j) => (j == axis ? col : a)) as [string, string]) : axes
                           ),
                       })
                     : cfg

+ 1 - 1
taipy/core/_repository/_decoder.py

@@ -35,7 +35,7 @@ class _Decoder(json.JSONDecoder):
         if not parts:
             raise TypeError("Can not deserialize string into timedelta")
         time_params = {name: float(param) for name, param in parts.groupdict().items() if param}
-        # mypy has an issue with dynamic keyword parameters, hence the type ignore on the line bellow.
+        # mypy has an issue with dynamic keyword parameters, hence the type ignore on the line below.
         return timedelta(**time_params)  # type: ignore
 
     def object_hook(self, source):

+ 1 - 1
taipy/core/data/parquet.py

@@ -69,7 +69,7 @@ class ParquetDataNode(DataNode, _AbstractFileDataNode, _AbstractTabularDataNode)
             - *"read_kwargs"* (`Optional[dict]`): Additional parameters passed to the
                 *pandas.read_parquet()* function.
             - *"write_kwargs"* (`Optional[dict]`): Additional parameters passed to the
-                *pandas.DataFrame.write_parquet()* fucntion.
+                *pandas.DataFrame.write_parquet()* function.
                 The parameters in *"read_kwargs"* and *"write_kwargs"* have a
                 **higher precedence** than the top-level parameters which are also passed to
                 Pandas.

+ 1 - 1
taipy/core/data/pickle.py

@@ -30,7 +30,7 @@ class PickleDataNode(DataNode, _AbstractFileDataNode):
 
     Attributes:
         config_id (str): Identifier of the data node configuration. It must be a valid Python
-            identifer.
+            identifier.
         scope (Scope^): The scope of this data node.
         id (str): The unique identifier of this data node.
         owner_id (str): The identifier of the owner (sequence_id, scenario_id, cycle_id) or

+ 1 - 1
taipy/gui/data/data_accessor.py

@@ -85,7 +85,7 @@ class _DataAccessors(object):
             try:
                 inst = cls()
             except Exception as e:
-                raise TypeError(f"Class {cls.__name__} cannot be instanciated") from e
+                raise TypeError(f"Class {cls.__name__} cannot be instantiated") from e
             if inst:
                 for name in names:
                     self.__access_4_type[name] = inst  # type: ignore

+ 1 - 1
taipy/gui/partial.py

@@ -22,7 +22,7 @@ if t.TYPE_CHECKING:
 
 
 class Partial(_Page):
-    """Re-usable Page content.
+    """Reusable Page content.
 
     Partials are used when you need to use a partial page content in different
     and not related pages. This allows not to have to repeat yourself when

+ 1 - 1
taipy/gui/utils/chart_config_builder.py

@@ -171,7 +171,7 @@ def _build_chart_config(gui: "Gui", attributes: t.Dict[str, t.Any], col_types: t
             e.value for e in (axis[j] if j < len(axis) else axis[0]) + (_Chart_iprops.label, _Chart_iprops.text)
         )
         columns.update([trace[i] or "" for i in dt_idx if trace[i]])
-    # add optionnal column if any
+    # add optional column if any
     markers = [
         t[_Chart_iprops.marker.value]
         or ({"color": t[_Chart_iprops.color.value]} if t[_Chart_iprops.color.value] else None)

+ 1 - 1
taipy/gui/viselements.json

@@ -746,7 +746,7 @@
             "name": "height",
             "type": "str",
             "default_value": "None",
-            "doc": "The height, in CSS units, of the indicator (used when orientation is vartical)."
+            "doc": "The height, in CSS units, of the indicator (used when orientation is vertical)."
           }
         ]
       }

+ 1 - 1
taipy/gui_core/viselements.json

@@ -60,7 +60,7 @@
                         "name": "show_pins",
                         "type": "bool",
                         "default_value": "False",
-                        "doc": "If True, a pin is shown on each item of the selector and allows to restrict the numnber of displayed items."
+                        "doc": "If True, a pin is shown on each item of the selector and allows to restrict the number of displayed items."
                     },
                     {
                       "name": "on_creation",

+ 1 - 1
taipy/templates/scenario-management/{{cookiecutter.__root_folder_name}}/pages/scenario_page/scenario_page.py

@@ -16,7 +16,7 @@ from .data_node_management import manage_partial
 
 def notify_on_submission(state, submitable, details):
     if details["submission_status"] == "COMPLETED":
-        notify(state, "success", "Submision completed!")
+        notify(state, "success", "Submission completed!")
     elif details["submission_status"] == "FAILED":
         notify(state, "error", "Submission failed!")
     else:

+ 1 - 1
tests/core/_entity/test_migrate_cli.py

@@ -122,7 +122,7 @@ def test_migrate_fs_backup_and_restore(caplog):
     assert f"Restored entities from the backup folder '{backup_path}' to '{data_path}'." in caplog.text
     assert not os.path.exists(backup_path)
 
-    # Compare migrated .data folder with data_sample to ensure restoreing the backup worked
+    # Compare migrated .data folder with data_sample to ensure restoring the backup worked
     dircmp_result = filecmp.dircmp(data_path, "tests/core/_entity/data_sample")
     assert not dircmp_result.diff_files and not dircmp_result.left_only and not dircmp_result.right_only
     for subdir in dircmp_result.subdirs.values():

+ 8 - 8
tests/core/data/test_data_node.py

@@ -210,39 +210,39 @@ class TestDataNode:
         assert dn.job_ids == [job_id]
 
     def test_is_valid_no_validity_period(self):
-        # Test Never been writen
+        # Test Never been written
         dn = InMemoryDataNode("foo", Scope.SCENARIO, DataNodeId("id"), "name", "owner_id")
         assert not dn.is_valid
 
-        # test has been writen
+        # test has been written
         dn.write("My data")
         assert dn.is_valid
 
     def test_is_valid_with_30_min_validity_period(self):
-        # Test Never been writen
+        # Test Never been written
         dn = InMemoryDataNode(
             "foo", Scope.SCENARIO, DataNodeId("id"), "name", "owner_id", validity_period=timedelta(minutes=30)
         )
         assert dn.is_valid is False
 
-        # Has been writen less than 30 minutes ago
+        # Has been written less than 30 minutes ago
         dn.write("My data")
         assert dn.is_valid is True
 
-        # Has been writen more than 30 minutes ago
+        # Has been written more than 30 minutes ago
         dn.last_edit_date = datetime.now() + timedelta(days=-1)
         assert dn.is_valid is False
 
     def test_is_valid_with_5_days_validity_period(self):
-        # Test Never been writen
+        # Test Never been written
         dn = InMemoryDataNode("foo", Scope.SCENARIO, validity_period=timedelta(days=5))
         assert dn.is_valid is False
 
-        # Has been writen less than 30 minutes ago
+        # Has been written less than 30 minutes ago
         dn.write("My data")
         assert dn.is_valid is True
 
-        # Has been writen more than 30 minutes ago
+        # Has been written more than 30 minutes ago
         dn._last_edit_date = datetime.now() - timedelta(days=6)
         _DataManager()._set(dn)
         assert dn.is_valid is False

+ 1 - 1
tests/core/scenario/test_scenario_manager.py

@@ -742,7 +742,7 @@ def test_notification_unsubscribe_multi_param():
 
     assert len(scenario.subscribers) == 3
 
-    # if no params are passed, removes the first occurrence of the subscriber when theres more than one copy
+    # if no params are passed, removes the first occurrence of the subscriber when there's more than one copy
     scenario.unsubscribe(notify_multi_param)
     assert len(scenario.subscribers) == 2
     assert _Subscriber(notify_multi_param, ["foobar", 123, 0]) not in scenario.subscribers

+ 1 - 1
tests/core/test_core_cli.py

@@ -292,7 +292,7 @@ def test_version_number_when_switching_mode():
         assert len(_VersionManager._get_all()) == 4
         core.stop()
 
-    # Run with dev mode, the version number is the same as the first dev version to overide it
+    # Run with dev mode, the version number is the same as the first dev version to override it
     with patch("sys.argv", ["prog", "--development"]):
         core = Core()
         core.run()

+ 1 - 1
tests/core/test_core_cli_with_sql_repo.py

@@ -292,7 +292,7 @@ def test_version_number_when_switching_mode(init_sql_repo):
         assert len(_VersionManager._get_all()) == 4
         core.stop()
 
-    # Run with dev mode, the version number is the same as the first dev version to overide it
+    # Run with dev mode, the version number is the same as the first dev version to override it
     with patch("sys.argv", ["prog", "--development"]):
         core = Core()
         core.run()

+ 2 - 2
tests/gui/builder/control/test_html.py

@@ -20,12 +20,12 @@ def test_html_builder(gui: Gui, test_client, helpers):
         with tgb.html("p", "This is a paragraph.", style="color:green;"):
             tgb.html("a", "a text", href="https://www.w3schools.com", target="_blank")
             tgb.html("br")
-            tgb.html("b", "This is bold text inside the paragrah.")
+            tgb.html("b", "This is bold text inside the paragraph.")
     expected_list = [
         '<h1 style="color:Tomato;">This is a header',
         '<p style="color:green;">This is a paragraph.',
         '<a href="https://www.w3schools.com" target="_blank">a text',
         "<br>",
-        "<b>This is bold text inside the paragrah.",
+        "<b>This is bold text inside the paragraph.",
     ]
     helpers.test_control_builder(gui, page, expected_list)