Skip to content

Commit

Permalink
ci: workaround more aggressive nightly rust lints
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Feb 23, 2024
1 parent 284d6ee commit 2329862
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:

jobs:
build:
continue-on-error: ${{ endsWith(inputs.python-version, '-dev') || contains(fromJSON('["3.7", "pypy3.7"]'), inputs.python-version) }}
continue-on-error: ${{ endsWith(inputs.python-version, '-dev') || contains(fromJSON('["3.7", "pypy3.7"]'), inputs.python-version) || inputs.rust == 'beta' || inputs.rust == 'nightly' }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ invalid_doc_attributes = "warn"
rust_2018_idioms = "warn"
rust_2021_prelude_collisions = "warn"
unused_lifetimes = "warn"
# rust nightly got stricter about these since PyO3 0.20 was released
dead_code = "allow"
unused_imports = "allow"

[workspace.lints.rustdoc]
broken_intra_doc_links = "warn"
Expand Down
2 changes: 0 additions & 2 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ mod import_lib;

use std::{
collections::{HashMap, HashSet},
convert::AsRef,
env,
ffi::{OsStr, OsString},
fmt::Display,
Expand Down Expand Up @@ -1792,7 +1791,6 @@ fn unescape(escaped: &str) -> Vec<u8> {

#[cfg(test)]
mod tests {
use std::iter::FromIterator;
use target_lexicon::triple;

use super::*;
Expand Down
1 change: 0 additions & 1 deletion src/conversions/chrono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ use chrono::{
DateTime, Datelike, Duration, NaiveDate, NaiveDateTime, NaiveTime, Offset, TimeZone, Timelike,
};
use pyo3_ffi::{PyDateTime_IMPORT, PyTimeZone_FromOffset};
use std::convert::TryInto;

impl ToPyObject for Duration {
fn to_object(&self, py: Python<'_>) -> PyObject {
Expand Down
4 changes: 1 addition & 3 deletions src/conversions/num_bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
//! assert n + 1 == value
//! ```

use crate::{
ffi, types::*, FromPyObject, IntoPy, Py, PyAny, PyObject, PyResult, Python, ToPyObject,
};
use crate::{ffi, types::*, FromPyObject, IntoPy, Py, PyObject, PyResult, Python, ToPyObject};

use num_bigint::{BigInt, BigUint};

Expand Down
1 change: 0 additions & 1 deletion src/conversions/std/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::inspect::types::TypeInfo;
use crate::{
exceptions, ffi, FromPyObject, IntoPy, PyAny, PyErr, PyObject, PyResult, Python, ToPyObject,
};
use std::convert::TryFrom;
use std::num::{
NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, NonZeroU128,
NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize,
Expand Down
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
rust_2021_prelude_collisions,
warnings
),
allow(unused_variables, unused_assignments, unused_extern_crates)
allow(
unused_variables,
unused_assignments,
unused_extern_crates,
unused_imports,
dead_code,
)
)))]

//! Rust bindings to the Python interpreter.
Expand Down
1 change: 0 additions & 1 deletion src/pyclass/create_type_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::{
use std::{
borrow::Cow,
collections::HashMap,
convert::TryInto,
ffi::{CStr, CString},
os::raw::{c_char, c_int, c_ulong, c_void},
ptr,
Expand Down
2 changes: 1 addition & 1 deletion src/types/capsule.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::Python;
use crate::{ffi, PyAny};
use crate::{pyobject_native_type_core, PyErr, PyResult};
use crate::{PyErr, PyResult};
use std::ffi::{CStr, CString};
use std::os::raw::{c_char, c_int, c_void};

Expand Down
1 change: 0 additions & 1 deletion src/types/list.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::convert::TryInto;
use std::iter::FusedIterator;

use crate::err::{self, PyResult};
Expand Down
1 change: 0 additions & 1 deletion src/types/tuple.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::convert::TryInto;
use std::iter::FusedIterator;

use crate::ffi::{self, Py_ssize_t};
Expand Down

0 comments on commit 2329862

Please sign in to comment.