Skip to content

Commit c73451e

Browse files
authored
Remove lint action (#3)
This commit contains the following changes Removed the lint action, since we are now using pre-commit. Added trailing newlines to some files which did not previously have them. Updated the zip Cargo dependency to 3.0.0 as the 2.x releases have been yanked Added rust files to pre-commit whitespace fixing
1 parent 342d35d commit c73451e

File tree

6 files changed

+20
-61
lines changed

6 files changed

+20
-61
lines changed

.github/workflows/lint.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ repos:
4242
- id: debug-statements
4343
# Removes trailing whitespace.
4444
- id: trailing-whitespace
45-
types_or: [python, c, c++, batch, markdown, toml, yaml]
45+
types_or: [python, batch, markdown, toml, yaml, rust]
4646
# Ensures all files end in 1 (and only 1) newline.
4747
- id: end-of-file-fixer
48-
types_or: [python, c, c++, batch, markdown, toml, yaml]
48+
types_or: [python, batch, markdown, toml, yaml, rust]
4949
# Removes the UTF-8 BOM from files that have it.
5050
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
5151
- id: fix-byte-order-marker
52-
types_or: [python, c, c++, batch, markdown, toml, yaml]
52+
types_or: [python, batch, markdown, toml, yaml, rust]
5353
# Validates TOML files.
5454
- id: check-toml
5555
# Validates YAML files.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ version = "0.22"
3131
features = ["extension-module", "abi3"]
3232

3333
[build-dependencies]
34-
zip = { version = "2.6", default-features = false, features = ["bzip2"] }
34+
zip = { version = "3.0", default-features = false, features = ["bzip2"] }
3535
mathcat = {version = "=0.6.9", features = ["include-zip"]} # for building, we want the zip files so we can include them separately
3636
# mathcat = { path = "../MathCAT/", features = ["include-zip"]} # for building, we want the zip files so we can include them separately
3737
# for testing MathCAT without having to publish a new version (change two occurrences)

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ fn main() {
1313

1414
let mut zip_archive = ZipArchive::new(archive).unwrap();
1515
zip_archive.extract(&location).expect("Zip extraction failed");
16-
}
16+
}

src/lib.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! 1. whatever preferences the AT needs to set, it is done with calls to [`SetPreference`].
33
//! 2. the MathML is sent over via [`SetMathML`].
44
//! 3. AT calls to get the speech [`GetSpokenText`] and calls [`GetBraille`] to get the (Unicode) braille.
5-
//!
5+
//!
66
//! Navigation can be done via calls to either:
77
//! * [`DoNavigateKeyPress`] (takes key events as input)
88
//! * [`DoNavigateCommand`] (takes the commands the key events internally map to)
@@ -14,7 +14,7 @@
1414
//! * [`GetNavigationMathML`] -- returns a string representing the MathML for the selected node
1515
//! Note: a second integer is returned. This is the offset in characters for a leaf node.
1616
//! This is needed when navigating by character for multi-symbol leaf nodes such as "sin" and "1234"
17-
//!
17+
//!
1818
//! It is also possible to find out what preferences are currently set by calling [`GetPreference`]
1919
//!
2020
//! AT can pass key strokes to allow a user to navigate the MathML by calling [`DoNavigateKeyPress`]; the speech is returned.
@@ -97,7 +97,7 @@ pub fn GetPreference(_py: Python, name: String) -> PyResult<String> {
9797
#[pyfunction]
9898
/// Get the braille associated with the MathML node with a given id (MathML set by `SetMathML`]).
9999
/// An empty string can be used to return the braille associated with the entire expression.
100-
///
100+
///
101101
/// The braille returned depends upon the preference for braille output.
102102
pub fn GetBraille(_py: Python, nav_node_id: String) -> PyResult<String> {
103103
return convert_error( get_braille(nav_node_id) );
@@ -106,7 +106,7 @@ pub fn GetBraille(_py: Python, nav_node_id: String) -> PyResult<String> {
106106
#[pyfunction]
107107
/// Get the braille associated with the MathML node with a given id (MathML set by `SetMathML`]).
108108
/// An empty string can be used to return the braille associated with the entire expression.
109-
///
109+
///
110110
/// The braille returned depends upon the preference for braille output.
111111
pub fn GetNavigationBraille(_py: Python) -> PyResult<String> {
112112
return convert_error( get_navigation_braille() );
@@ -124,17 +124,17 @@ pub fn DoNavigateKeyPress(_py: Python, key: usize, shift_key: bool, control_key:
124124
/// Given a command, the current node is moved accordingly (or value reported in some cases).
125125
///
126126
/// The spoken text for the new current node is returned.
127-
///
127+
///
128128
/// The list of legal commands are:
129-
/// "MovePrevious", "MoveNext", "MoveStart", "MoveEnd", "MoveLineStart", "MoveLineEnd",
130-
/// "MoveCellPrevious", "MoveCellNext", "MoveCellUp", "MoveCellDown", "MoveColumnStart", "MoveColumnEnd",
131-
/// "ZoomIn", "ZoomOut", "ZoomOutAll", "ZoomInAll",
132-
/// "MoveLastLocation",
133-
/// "ReadPrevious", "ReadNext", "ReadCurrent", "ReadCellCurrent", "ReadStart", "ReadEnd", "ReadLineStart", "ReadLineEnd",
134-
/// "DescribePrevious", "DescribeNext", "DescribeCurrent",
135-
/// "WhereAmI", "WhereAmIAll",
136-
/// "ToggleZoomLockUp", "ToggleZoomLockDown", "ToggleSpeakMode",
137-
/// "Exit",
129+
/// "MovePrevious", "MoveNext", "MoveStart", "MoveEnd", "MoveLineStart", "MoveLineEnd",
130+
/// "MoveCellPrevious", "MoveCellNext", "MoveCellUp", "MoveCellDown", "MoveColumnStart", "MoveColumnEnd",
131+
/// "ZoomIn", "ZoomOut", "ZoomOutAll", "ZoomInAll",
132+
/// "MoveLastLocation",
133+
/// "ReadPrevious", "ReadNext", "ReadCurrent", "ReadCellCurrent", "ReadStart", "ReadEnd", "ReadLineStart", "ReadLineEnd",
134+
/// "DescribePrevious", "DescribeNext", "DescribeCurrent",
135+
/// "WhereAmI", "WhereAmIAll",
136+
/// "ToggleZoomLockUp", "ToggleZoomLockDown", "ToggleSpeakMode",
137+
/// "Exit",
138138
/// "MoveTo0","MoveTo1","MoveTo2","MoveTo3","MoveTo4","MoveTo5","MoveTo6","MoveTo7","MoveTo8","MoveTo9",
139139
/// "Read0","Read1","Read2","Read3","Read4","Read5","Read6","Read7","Read8","Read9",
140140
/// "Describe0","Describe1","Describe2","Describe3","Describe4","Describe5","Describe6","Describe7","Describe8","Describe9",
@@ -192,4 +192,4 @@ mod py_tests {
192192
Err(e) => panic!("Error remains {}", e.to_string()),
193193
}
194194
}
195-
}
195+
}

0 commit comments

Comments
 (0)