Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell to pre-commit and fix typos #484

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ repos:
- "types-Pygments>=2.17"
- "types-colorama>=0.4.15.12"
- "types-setuptools>=69"
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ jupyter labextension develop . --overwrite
```

Note for developers: the `--symlink` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.
`

## Contributions

Expand Down
2 changes: 1 addition & 1 deletion examples/Column Width Auto-Fit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"### `ipydatagrid` supports auto-fitting of column widths!\n",
"\n",
"The DataGrid constructor can take the following arguments:\n",
"1. `auto_fit_columns`: boolean, indicates whether to auot-fit column widths. Setting to False will reset all column sizes to `base_column_size`.\n",
"1. `auto_fit_columns`: boolean, indicates whether to auto-fit column widths. Setting to False will reset all column sizes to `base_column_size`.\n",
"2. `auto_fit_params` : dict, allows for more granular customisation of the auto-fitting algorithm:\n",
" * `area`: select which section of the grid to apply auto-fitting on. Possible options are `all`, `row-header` (index column) and `body`.\n",
" * `padding`: specifies how much padding should be added to the width of each column after resizing (default 30) \n",
Expand Down
2 changes: 1 addition & 1 deletion examples/ConditionalFormatting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
" }\n",
")\n",
"\n",
"# Formatting the values in column 1 based on the value of the silbing row in column 2\n",
"# Formatting the values in column 1 based on the value of the sibling row in column 2\n",
"def format_based_on_other_column(cell):\n",
" return \"green\" if cell.metadata.data[\"Column 2\"] > 0.0 else \"yellow\"\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/DataGrid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Perfomance test: A million cells with ipydatagrid"
"# Performance test: A million cells with ipydatagrid"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Themes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"14. `header_selection_border_color`: border color of headers intersecting with selected area at column or row\n",
"15. `cursor_fill_color`: fill color of cursor\n",
"16. `cursor_border_color`: border color of cursor\n",
"17. `scroll_shadow` : Dict of color parameters for scroll shadow (vertical and horizontal). Takes three paramaters:\n",
"17. `scroll_shadow` : Dict of color parameters for scroll shadow (vertical and horizontal). Takes three parameters:\n",
" * `size` : size of shadow in pixels\n",
" * `color1` : gradient color 1\n",
" * `color2` : gradient color 2\n",
Expand Down
2 changes: 1 addition & 1 deletion ipydatagrid/datagrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class DataGrid(DOMWidget):
cursor_fill_color : fill color of cursor
cursor_border_color : border color of cursor
scroll_shadow : Dict of color parameters for scroll shadow (vertical and
horizontal). Takes three paramaters:
horizontal). Takes three parameters:
size : size of shadow in pixels
color1 : gradient color 1
color2 : gradient color 2
Expand Down
2 changes: 1 addition & 1 deletion js/core/filterMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class InteractiveFilterDialog extends BoxPanel {

this.userInteractedWithDialog = false;

// Determines whether we should or not tick the "Select all" chekcbox
// Determines whether we should or not tick the "Select all" checkbox
this.updateSelectAllCheckboxState();

// Update styling on unique value grid
Expand Down
4 changes: 2 additions & 2 deletions js/core/gridContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export abstract class GridContextMenu {
}

/**
* Opens the context menu in reponse to the `cellClick` signal of the
* Opens the context menu in response to the `cellClick` signal of the
* data grid.
*
* @param grid - The "sender" of the signal.
Expand Down Expand Up @@ -74,7 +74,7 @@ export namespace GridContextMenu {
*/
export class FeatherGridContextMenu extends GridContextMenu {
/**
* Opens the context menu in reponse to the `cellClick` signal of the
* Opens the context menu in response to the `cellClick` signal of the
* data grid.
*
* @param grid - The "sender" of the signal.
Expand Down
4 changes: 2 additions & 2 deletions js/core/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export namespace Transform {
*/
export type Filter = {
/**
* A type alias for this trasformation.
* A type alias for this transformation.
*/
type: 'filter';

Expand All @@ -39,7 +39,7 @@ export namespace Transform {
columnIndex: number;

/**
* The operator for this trasformation.
* The operator for this transformation.
*/
operator: FilterOperator;

Expand Down
2 changes: 1 addition & 1 deletion js/core/transformStateManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class TransformStateManager {
}

/**
* Creates an optimzed list of TransformExecutors for the provided data.
* Creates an optimized list of TransformExecutors for the provided data.
*
* @param data - The dataset to operate on.
*/
Expand Down
2 changes: 1 addition & 1 deletion js/datagrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class DataGridModel extends DOMWidgetModel {
}

/**
* Helper function to conver snake_case strings to camelCase.
* Helper function to convert snake_case strings to camelCase.
* Assumes all strings are valid snake_case (all lowercase).
* @param string snake_case string
* @returns camelCase string
Expand Down
2 changes: 1 addition & 1 deletion js/vegaexpr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class VegaExprView extends WidgetView {

export interface ParsedVegaExpr {
/**
* A JavaScript soring literal describing
* A JavaScript storing literal describing
* the converted vega expression
*/
code: string;
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ disable = "C0330, C0326"
[tool.pylint.format]
max-line-length = "80"

[tool.codespell]
ignore-words-list = "statics"
skip = "*/yarn.lock"

[tool.tbump]
field = [
{ name = "channel", default = "" },
Expand Down
2 changes: 1 addition & 1 deletion ui-tests-ipw7/tests/notebooks/conditional_formatting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
" }\n",
")\n",
"\n",
"# Formatting the values in column 1 based on the value of the silbing row in column 2\n",
"# Formatting the values in column 1 based on the value of the sibling row in column 2\n",
"def format_based_on_other_column(cell):\n",
" return \"green\" if cell.metadata.data[\"Column 2\"] > 0.0 else \"yellow\"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"metadata": {},
"outputs": [],
"source": [
"# We can potentially improve the hueristics for this calculation\n",
"# We can potentially improve the heuristics for this calculation\n",
"nested_grid.auto_fit_columns = True"
]
},
Expand Down
2 changes: 1 addition & 1 deletion ui-tests-ipw8/tests/notebooks/conditional_formatting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
" }\n",
")\n",
"\n",
"# Formatting the values in column 1 based on the value of the silbing row in column 2\n",
"# Formatting the values in column 1 based on the value of the sibling row in column 2\n",
"def format_based_on_other_column(cell):\n",
" return \"green\" if cell.metadata.data[\"Column 2\"] > 0.0 else \"yellow\"\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"metadata": {},
"outputs": [],
"source": [
"# We can potentially improve the hueristics for this calculation\n",
"# We can potentially improve the heuristics for this calculation\n",
"nested_grid.auto_fit_columns = True"
]
},
Expand Down
Loading