Skip to content

Commit

Permalink
🎨 Fix duplicated namespace py = pybind11;
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa committed Dec 3, 2024
1 parent 6b04f4d commit 9458338
Show file tree
Hide file tree
Showing 30 changed files with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace pyfiction
inline void exact(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::enum_<fiction::technology_constraints>(m, "technology_constraints", DOC(fiction_technology_constraints))
.value("NONE", fiction::technology_constraints::NONE, DOC(fiction_technology_constraints_NONE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ namespace pyfiction
inline void graph_oriented_layout_design(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::enum_<fiction::graph_oriented_layout_design_params::effort_mode>(
m, "gold_effort_mode", DOC(fiction_graph_oriented_layout_design_params_effort_mode))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ namespace pyfiction
inline void orthogonal(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::orthogonal_physical_design_params>(m, "orthogonal_params",
DOC(fiction_orthogonal_physical_design_params))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace pyfiction
inline void post_layout_optimization(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::post_layout_optimization_params>(m, "post_layout_optimization_params",
DOC(fiction_post_layout_optimization_params))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace pyfiction
inline void wiring_reduction(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::wiring_reduction_params>(m, "wiring_reduction_params", DOC(fiction_wiring_reduction_params))
.def(py::init<>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ template <typename Lyt>
void assess_physical_population_stability(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

m.def("assess_physical_population_stability", &fiction::assess_physical_population_stability<Lyt>, py::arg("lyt"),
py::arg("params") = fiction::assess_physical_population_stability_params{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ template <typename Lyt>
void compute_operational_ratio(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

m.def("compute_operational_ratio", &fiction::compute_operational_ratio<Lyt, py_tt>, py::arg("lyt"), py::arg("spec"),
py::arg("pp"), py::arg("params") = fiction::operational_domain_params{},
Expand All @@ -36,7 +35,6 @@ void compute_operational_ratio(pybind11::module& m)
inline void compute_operational_ratio(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::compute_operational_ratio_params>(m, "compute_operational_ratio_params",
DOC(fiction_compute_operational_ratio_params))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ void detect_bdl_pairs(pybind11::module& m)
inline void detect_bdl_pairs(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::bdl_pair<fiction::offset::ucoord_t>>(m, "bdl_pair", DOC(fiction_bdl_pair))
.def(py::init<>(), DOC(fiction_bdl_pair_bdl_pair))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ template <typename Lyt>
void detect_bdl_wires(pybind11::module& m, const std::string& lattice)
{
namespace py = pybind11;
namespace py = pybind11;

using bdl_wire_t = fiction::bdl_wire<Lyt>;

Expand Down Expand Up @@ -52,7 +51,6 @@ void detect_bdl_wires(pybind11::module& m, const std::string& lattice)
inline void detect_bdl_wires(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

// Enum for wire selection options
py::enum_<fiction::bdl_wire_selection>(m, "bdl_wire_selection", DOC(fiction_bdl_wire_selection))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void determine_physically_valid_parameters(pybind11::module& m)
inline void determine_physically_valid_parameters(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::operational_domain<fiction::parameter_point, uint64_t>>(m, "physically_valid_parameters_domain",
DOC(fiction_operational_domain))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ void determine_displacement_robustness_domain(pybind11::module& m, const std::st
{

namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::displacement_robustness_domain<Lyt>>(
m, fmt::format("displacement_robustness_domain{}", lattice).c_str())
Expand All @@ -42,7 +41,6 @@ void determine_displacement_robustness_domain(pybind11::module& m, const std::st
inline void determine_displacement_robustness_domain(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::enum_<fiction::displacement_robustness_domain_params<fiction::offset::ucoord_t>::dimer_displacement_policy>(
m, "dimer_displacement_policy")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ void operational_domain(pybind11::module& m)
inline void operational_domain(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::parameter_point>(m, "parameter_point", DOC(fiction_parameter_point))
.def(py::init<>(), DOC(fiction_parameter_point_parameter_point))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ inline void quickexact(pybind11::module& m)
{
// NOTE be careful with the order of the following calls! Python will resolve the first matching overload!
namespace py = pybind11;
namespace py = pybind11;

py::enum_<typename fiction::quickexact_params<fiction::offset::ucoord_t>::automatic_base_number_detection>(
m, "automatic_base_number_detection", DOC(fiction_quickexact_params_automatic_base_number_detection))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void random_layout_generator(pybind11::module& m)
inline void random_sidb_layout_generator(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::enum_<typename fiction::generate_random_sidb_layout_params<fiction::offset::ucoord_t>::positive_charges>(
m, "positive_charges", DOC(fiction_generate_random_sidb_layout_params_positive_charges))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace pyfiction
inline void sidb_simulation_parameters(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::sidb_simulation_parameters>(m, "sidb_simulation_parameters",
DOC(fiction_sidb_simulation_parameters))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ template <typename Lyt>
void sidb_simulation_result(pybind11::module& m, const std::string& lattice = "")
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::sidb_simulation_result<Lyt>>(m, fmt::format("sidb_simulation_result{}", lattice).c_str(),
DOC(fiction_sidb_simulation_result))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace pyfiction
inline void write_qca_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<fiction::write_qca_layout_params>(m, "write_qca_layout_params", DOC(fiction_write_qca_layout_params))
.def(py::init<>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ inline void write_qca_layout_svg_impl(pybind11::module& m)
void write_svg_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::enum_<fiction::write_sidb_layout_svg_params::color_mode>(m, "color_mode",
DOC(fiction_write_sidb_layout_svg_params_color_mode))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace pyfiction
inline void cartesian_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

/**
* Cartesian layout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ template <typename Technology>
void fcn_technology_cell_level_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

// fetch technology name
auto tech_name = std::string{fiction::tech_impl_name<Technology>};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ template <typename LytBase, typename ClockedLyt>
void clocked_layout(pybind11::module& m, const std::string& topology)
{
namespace py = pybind11;
namespace py = pybind11;

/**
* Clocked Cartesian layout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace pyfiction
inline void offset_coordinate(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<py_offset_coordinate>(m, "offset_coordinate", DOC(fiction_offset_ucoord_t))
.def(py::init<>(), DOC(fiction_offset_ucoord_t_ucoord_t))
Expand Down Expand Up @@ -93,7 +92,6 @@ inline void offset_coordinate(pybind11::module& m)
inline void cube_coordinate(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<py_cube_coordinate>(m, "cube_coordinate", DOC(fiction_cube_coord_t))
.def(py::init<>(), DOC(fiction_cube_coord_t_coord_t))
Expand Down Expand Up @@ -150,7 +148,6 @@ inline void cube_coordinate(pybind11::module& m)
inline void siqad_coordinate(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<py_siqad_coordinate>(m, "siqad_coordinate", DOC(fiction_siqad_coord_t))
.def(py::init<>(), DOC(fiction_siqad_coord_t_coord_t))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ template <typename LytBase, typename GateLyt>
void gate_level_layout(pybind11::module& m, const std::string& topology)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<GateLyt, LytBase>(m, fmt::format("{}_gate_layout", topology).c_str(), DOC(fiction_gate_level_layout))
.def(py::init<>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace pyfiction
inline void hexagonal_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

/**
* Hexagonal layout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ template <typename LytBase, typename ObstrLyt>
void obstruction_layout(pybind11::module& m, const std::string& topology)
{
namespace py = pybind11;
namespace py = pybind11;

py::class_<ObstrLyt, LytBase>(m, fmt::format("{}_obstruction_layout", topology).c_str(),
DOC(fiction_obstruction_layout))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace pyfiction
inline void shifted_cartesian_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

/**
* Shifted Cartesian layout.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ template <typename Ntk>
void network(pybind11::module& m, const std::string& network_name)
{
namespace py = pybind11;
namespace py = pybind11;

/**
* Network node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ template <typename Lyt>
void charge_distribution_surface_layout(pybind11::module& m, const std::string& lattice = "")
{
namespace py = pybind11;
namespace py = pybind11;

using py_cds = py_charge_distribution_surface_layout<Lyt>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace pyfiction
inline void sidb_charge_state(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

py::enum_<fiction::sidb_charge_state>(m, "sidb_charge_state", DOC(fiction_sidb_charge_state))
.value("NEGATIVE", fiction::sidb_charge_state::NEGATIVE, DOC(fiction_sidb_charge_state_NEGATIVE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ template <typename LatticeOrientation>
void sidb_lattice_cell_level_layout(pybind11::module& m)
{
namespace py = pybind11;
namespace py = pybind11;

// fetch technology name
auto orientation = std::string{fiction::sidb_lattice_name<LatticeOrientation>};
Expand Down

0 comments on commit 9458338

Please sign in to comment.