@@ -7,70 +7,6 @@ use pyo3::{pyclass, pymethods};
77use radiate:: { Metric , MetricSet } ;
88use serde:: { Deserialize , Serialize } ;
99
10- // #[pyclass]
11- // #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
12- // pub enum PyTagKind {
13- // Selector,
14- // Alterer,
15- // Mutator,
16- // Crossover,
17- // Species,
18- // Failure,
19- // Age,
20- // Front,
21- // Derived,
22- // Other,
23- // Statistic,
24- // Time,
25- // Distribution,
26- // Score,
27- // Rate,
28- // }
29-
30- // impl Into<TagKind> for PyTagKind {
31- // fn into(self) -> TagKind {
32- // match self {
33- // PyTagKind::Selector => TagKind::Selector,
34- // PyTagKind::Alterer => TagKind::Alterer,
35- // PyTagKind::Mutator => TagKind::Mutator,
36- // PyTagKind::Crossover => TagKind::Crossover,
37- // PyTagKind::Species => TagKind::Species,
38- // PyTagKind::Failure => TagKind::Failure,
39- // PyTagKind::Age => TagKind::Age,
40- // PyTagKind::Front => TagKind::Front,
41- // PyTagKind::Derived => TagKind::Derived,
42- // PyTagKind::Other => TagKind::Other,
43- // PyTagKind::Statistic => TagKind::Statistic,
44- // PyTagKind::Time => TagKind::Time,
45- // PyTagKind::Distribution => TagKind::Distribution,
46- // PyTagKind::Score => TagKind::Score,
47- // PyTagKind::Rate => TagKind::Rate,
48- // }
49- // }
50- // }
51-
52- // impl From<TagKind> for PyTagKind {
53- // fn from(tag: TagKind) -> Self {
54- // match tag {
55- // TagKind::Selector => PyTagKind::Selector,
56- // TagKind::Alterer => PyTagKind::Alterer,
57- // TagKind::Mutator => PyTagKind::Mutator,
58- // TagKind::Crossover => PyTagKind::Crossover,
59- // TagKind::Species => PyTagKind::Species,
60- // TagKind::Failure => PyTagKind::Failure,
61- // TagKind::Age => PyTagKind::Age,
62- // TagKind::Front => PyTagKind::Front,
63- // TagKind::Derived => PyTagKind::Derived,
64- // TagKind::Other => PyTagKind::Other,
65- // TagKind::Statistic => PyTagKind::Statistic,
66- // TagKind::Time => PyTagKind::Time,
67- // TagKind::Distribution => PyTagKind::Distribution,
68- // TagKind::Score => PyTagKind::Score,
69- // TagKind::Rate => PyTagKind::Rate,
70- // }
71- // }
72- // }
73-
7410#[ pyclass]
7511#[ derive( Clone , Deserialize , Serialize ) ]
7612#[ repr( transparent) ]
@@ -242,11 +178,7 @@ impl From<Metric> for PyMetric {
242178#[ pymethods]
243179impl PyMetric {
244180 pub fn __repr__ ( & self ) -> String {
245- format ! (
246- "PyMetric(name='{}', count={})" ,
247- self . inner. name( ) ,
248- self . inner. count( )
249- )
181+ format ! ( "PyMetric(name='{}')" , self . inner. name( ) )
250182 }
251183
252184 pub fn __dict__ < ' py > ( & self , py : Python < ' py > ) -> PyResult < Bound < ' py , PyDict > > {
0 commit comments