diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5850a78..9806a79 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ ci: - skip: [fmt] + skip: [fmt, mypy] repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -10,7 +10,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.0 hooks: - id: mypy additional_dependencies: @@ -35,7 +35,7 @@ repos: exclude: ".*/test_.*\\.py|.*/conftest\\.py|src/rest_api_postgres/python/.*|src/pyp3_mock_data/.*|src/pyo3_mock_data/.*" args: [--explicit-package-bases] # This is because of the mono repo type setup - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.0 hooks: - id: mypy pass_filenames: false @@ -51,14 +51,14 @@ repos: ] entry: bash -c 'cd src/rest_api_postgres/python && mypy -p app "$@"' -- - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.14.0 hooks: - id: mypy pass_filenames: false files: ^src/pyp3_mock_data/ entry: bash -c 'cd src/pyo3_mock_data && mypy -p pyp3_mock_data "$@"' -- - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.8.4 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/Cargo.lock b/Cargo.lock index 79f7e6a..5b8ea2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -2064,9 +2064,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.22.5" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d922163ba1f79c04bc49073ba7b32fd5a8d3b76a87c955921234b8e77333c51" +checksum = "e484fd2c8b4cb67ab05a318f1fd6fa8f199fcc30819f08f07d200809dba26c15" dependencies = [ "cfg-if", "indoc", @@ -2082,9 +2082,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.22.5" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc38c5feeb496c8321091edf3d63e9a6829eab4b863b4a6a65f26f3e9cc6b179" +checksum = "dc0e0469a84f208e20044b98965e1561028180219e35352a2afaf2b942beff3b" dependencies = [ "once_cell", "target-lexicon", @@ -2092,9 +2092,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.22.5" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94845622d88ae274d2729fcefc850e63d7a3ddff5e3ce11bd88486db9f1d357d" +checksum = "eb1547a7f9966f6f1a0f0227564a9945fe36b90da5a93b3933fc3dc03fae372d" dependencies = [ "libc", "pyo3-build-config", @@ -2102,9 +2102,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.22.5" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e655aad15e09b94ffdb3ce3d217acf652e26bbc37697ef012f5e5e348c716e5e" +checksum = "fdb6da8ec6fa5cedd1626c886fc8749bdcbb09424a86461eb8cdf096b7c33257" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -2114,9 +2114,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.22.5" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1e3f09eecd94618f60a455a23def79f79eba4dc561a97324bf9ac8c6df30ce" +checksum = "38a385202ff5a92791168b1136afae5059d3ac118457bb7bc304c197c2d33e7d" dependencies = [ "heck 0.5.0", "proc-macro2", diff --git a/src/mock_data/python/main.py b/src/mock_data/python/main.py index 1ed0cb0..98d8f3d 100644 --- a/src/mock_data/python/main.py +++ b/src/mock_data/python/main.py @@ -57,7 +57,7 @@ def generate_fake_persons(faker: Faker, locations: list[Location], num: int) -> id=i, name=f"{faker.first_name()} {faker.last_name()}", age=random.randint(22, 65), - isMarried=faker.random_element(elements=("true", "false")), + isMarried=faker.random_element(elements=(True, False)), city=location["city"], state=location["state"], country=location["country"], diff --git a/src/parallelism/rust/src/main.rs b/src/parallelism/rust/src/main.rs index 33cd63a..76b3132 100644 --- a/src/parallelism/rust/src/main.rs +++ b/src/parallelism/rust/src/main.rs @@ -107,7 +107,6 @@ fn main() { // Tests #[cfg(test)] - mod tests { use super::*; diff --git a/src/pyo3_mock_data/Cargo.toml b/src/pyo3_mock_data/Cargo.toml index 473e070..35bc287 100644 --- a/src/pyo3_mock_data/Cargo.toml +++ b/src/pyo3_mock_data/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] csv = "1.3.0" fake = { version = "2.9.2", features = ["derive"] } -pyo3 = { version = "0.22.5", features = ["extension-module"] } +pyo3 = { version = "0.23.3", features = ["extension-module"] } rand = "0.8.5" serde = { version = "1.0.193", features = ["derive"] } unicode-normalization = "0.1.22" diff --git a/src/pyo3_mock_data/src/lib.rs b/src/pyo3_mock_data/src/lib.rs index b99ab3b..a1cece6 100644 --- a/src/pyo3_mock_data/src/lib.rs +++ b/src/pyo3_mock_data/src/lib.rs @@ -162,10 +162,7 @@ fn generate_mock_persons( #[pymodule] fn _pyo3_mock_data(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_function(wrap_pyfunction!(generate_mock_persons, m)?)?; - m.add( - "FileNotFoundError", - py.get_type_bound::(), - )?; + m.add("FileNotFoundError", py.get_type::())?; Ok(()) } diff --git a/src/simple_csv/rust/src/main.rs b/src/simple_csv/rust/src/main.rs index f95cb41..5f2b8f9 100644 --- a/src/simple_csv/rust/src/main.rs +++ b/src/simple_csv/rust/src/main.rs @@ -79,7 +79,6 @@ fn main() { } #[cfg(test)] - mod tests { use super::*; use approx::assert_abs_diff_eq;