@@ -150,6 +150,7 @@ def from_dict(cls, d):
150
150
verbose = d ["verbose" ],
151
151
)
152
152
153
+ @classmethod
153
154
@np .deprecate (message = "Use from_str instead" )
154
155
def from_string (cls , * args , ** kwargs ):
155
156
return cls .from_str (* args , ** kwargs )
@@ -720,6 +721,7 @@ def from_file(file: str):
720
721
txt = preprocessor (f .read (), os .path .dirname (f .name ))
721
722
return Cp2kInput .from_str (txt )
722
723
724
+ @classmethod
723
725
@np .deprecate (message = "Use from_str instead" )
724
726
def from_string (cls , * args , ** kwargs ):
725
727
return cls .from_str (* args , ** kwargs )
@@ -2247,6 +2249,7 @@ def softmatch(self, other):
2247
2249
d2 = other .as_dict ()
2248
2250
return all (not (v is not None and v != d2 [k ]) for k , v in d1 .items ())
2249
2251
2252
+ @classmethod
2250
2253
@np .deprecate (message = "Use from_str instead" )
2251
2254
def from_string (cls , * args , ** kwargs ):
2252
2255
return cls .from_str (* args , ** kwargs )
@@ -2551,6 +2554,7 @@ def softmatch(self, other):
2551
2554
d2 = other .as_dict ()
2552
2555
return all (not (v is not None and v != d2 [k ]) for k , v in d1 .items ())
2553
2556
2557
+ @classmethod
2554
2558
@np .deprecate (message = "Use from_str instead" )
2555
2559
def from_string (cls , * args , ** kwargs ):
2556
2560
return cls .from_str (* args , ** kwargs )
@@ -2692,6 +2696,7 @@ def get_string(self):
2692
2696
out += "\n "
2693
2697
return out
2694
2698
2699
+ @classmethod
2695
2700
@np .deprecate (message = "Use from_str instead" )
2696
2701
def from_string (cls , * args , ** kwargs ):
2697
2702
return cls .from_str (* args , ** kwargs )
@@ -2781,6 +2786,7 @@ def from_file(cls, fn):
2781
2786
obj .filename = fn
2782
2787
return data
2783
2788
2789
+ @classmethod
2784
2790
@np .deprecate (message = "Use from_str instead" )
2785
2791
def from_string (cls , * args , ** kwargs ):
2786
2792
return cls .from_str (* args , ** kwargs )
0 commit comments