Skip to content
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
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: Cargo fmt
run: cargo fmt --all -- --check
run: |
cargo fmt --all -- --check
cd pyo3-object_store && cargo fmt --all -- --check && cd ..
cd pyo3-bytes && cargo fmt --all -- --check && cd ..

- name: "clippy --all"
run: cargo clippy --all --all-features --tests -- -D warnings
run: |
cargo clippy --all --all-features --tests -- -D warnings
cd pyo3-object_store && cargo clippy --all --all-features --tests -- -D warnings && cd ..
cd pyo3-bytes && cargo clippy --all --all-features --tests -- -D warnings && cd ..

- name: "cargo check"
run: cargo check --all --all-features
Expand Down
22 changes: 1 addition & 21 deletions pyo3-object_store/src/aws/shared_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn from_sdk_config(config: SdkConfig) -> AmazonS3Builder {
builder = builder.with_endpoint(endpoint);
}
if let Some(retry_config) = config.retry_config() {
builder = builder.with_retry(from_retry_config(&retry_config));
builder = builder.with_retry(from_retry_config(retry_config));
}

builder
Expand Down Expand Up @@ -63,23 +63,3 @@ impl CredentialProvider for WrappedAwsCredentialsProvider {
Ok(Arc::new(credentials))
}
}

#[cfg(test)]
mod test {
use super::*;
use object_store::aws::AwsCredentialProvider;

#[test]
fn tmp() {}

#[tokio::test]
async fn test_s3() {
let config = aws_config::from_env();

let config = aws_config::load_from_env().await;
dbg!(&config);
let creds = config.credentials_provider().unwrap();
// let creds = AWSCredentials(creds).get_credential().await.unwrap();
// dbg!(creds);
}
}
4 changes: 2 additions & 2 deletions pyo3-object_store/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ pub fn get_runtime(py: Python<'_>) -> PyResult<&'static Runtime> {
}

let runtime = RUNTIME.get_or_try_init(py, || {
Ok::<_, PyErr>(Runtime::new().map_err(|err| {
Runtime::new().map_err(|err| {
PyValueError::new_err(format!("Could not create tokio runtime. {}", err))
})?)
})
})?;
Ok(runtime)
}