Skip to content

Commit

Permalink
Do explicit imports instead of pyo3::prelude::*
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Sep 13, 2023
1 parent 660fef6 commit b583c6a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use thiserror::Error;

#[cfg(feature = "pyo3")]
use pyo3::{create_exception, exceptions::PyException, prelude::*};
use pyo3::{create_exception, exceptions::PyException, PyErr};

use crate::hugr::{HugrError, Node, ValidationError, Wire};
use crate::ops::handle::{BasicBlockID, CfgID, ConditionalID, DfgID, FuncID, TailLoopID};
Expand Down
2 changes: 1 addition & 1 deletion src/hugr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use portgraph::{Hierarchy, NodeIndex, PortMut, UnmanagedDenseMap};
use thiserror::Error;

#[cfg(feature = "pyo3")]
use pyo3::{create_exception, exceptions::PyException, prelude::*};
use pyo3::{create_exception, exceptions::PyException, pyclass};

pub use self::views::HugrView;
use crate::extension::{
Expand Down
2 changes: 1 addition & 1 deletion src/hugr/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::collections::HashMap;
use thiserror::Error;

#[cfg(feature = "pyo3")]
use pyo3::{create_exception, exceptions::PyException, prelude::*};
use pyo3::{create_exception, exceptions::PyException, PyErr};

use crate::extension::ExtensionSet;
use crate::hugr::{Hugr, NodeType};
Expand Down
2 changes: 1 addition & 1 deletion src/hugr/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use portgraph::{LinkView, PortView};
use thiserror::Error;

#[cfg(feature = "pyo3")]
use pyo3::{create_exception, exceptions::PyException, prelude::*};
use pyo3::{create_exception, exceptions::PyException, PyErr};

use crate::extension::SignatureError;
use crate::extension::{
Expand Down
2 changes: 1 addition & 1 deletion src/hugr/views/sibling_subgraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
use super::HugrView;

#[cfg(feature = "pyo3")]
use pyo3::{create_exception, exceptions::PyException, prelude::*};
use pyo3::{create_exception, exceptions::PyException, PyErr};

/// A non-empty convex subgraph of a HUGR sibling graph.
///
Expand Down
2 changes: 1 addition & 1 deletion src/std_extensions/rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use num_rational::Rational64;
use smol_str::SmolStr;

#[cfg(feature = "pyo3")]
use pyo3::prelude::*;
use pyo3::{pyclass, FromPyObject};

use crate::extension::ExtensionId;
use crate::types::type_param::TypeArg;
Expand Down
2 changes: 1 addition & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::fmt::Debug;
use self::primitive::PrimType;

#[cfg(feature = "pyo3")]
use pyo3::prelude::*;
use pyo3::pyclass;

/// The kinds of edges in a HUGR, excluding Hierarchy.
#[derive(Clone, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion src/types/signature.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Abstract and concrete Signature types.
#[cfg(feature = "pyo3")]
use pyo3::prelude::*;
use pyo3::{pyclass, pymethods};

use std::ops::Index;

Expand Down
2 changes: 1 addition & 1 deletion src/types/type_row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::utils::display_list;
use delegate::delegate;

#[cfg(feature = "pyo3")]
use pyo3::prelude::*;
use pyo3::pyclass;

/// List of types, used for function signatures.
#[derive(Clone, PartialEq, Eq, Debug, serde::Serialize, serde::Deserialize)]
Expand Down

0 comments on commit b583c6a

Please sign in to comment.