Skip to content

Commit

Permalink
merge main to current
Browse files Browse the repository at this point in the history
  • Loading branch information
prrao87 committed Dec 25, 2024
2 parents c9468d0 + 9f46431 commit 094221f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ci:
skip: [fmt]
skip: [fmt, mypy]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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]
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/mock_data/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
1 change: 0 additions & 1 deletion src/parallelism/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ fn main() {
// Tests

#[cfg(test)]

mod tests {
use super::*;

Expand Down
2 changes: 1 addition & 1 deletion src/pyo3_mock_data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 1 addition & 4 deletions src/pyo3_mock_data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<FileNotFoundError>(),
)?;
m.add("FileNotFoundError", py.get_type::<FileNotFoundError>())?;

Ok(())
}
1 change: 0 additions & 1 deletion src/simple_csv/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ fn main() {
}

#[cfg(test)]

mod tests {
use super::*;
use approx::assert_abs_diff_eq;
Expand Down

0 comments on commit 094221f

Please sign in to comment.