Skip to content

Commit 69e60c9

Browse files
committed
Sort methods.
1 parent aa75d06 commit 69e60c9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

benedict/dicts/io/io_dict.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ def from_base64(cls, s, subformat="json", encoding="utf-8", **kwargs):
6969
kwargs["encoding"] = encoding
7070
return cls(s, format="base64", **kwargs)
7171

72+
@classmethod
73+
def from_cli(cls, s, **kwargs):
74+
"""
75+
Load and decode data from a string of CLI arguments.
76+
ArgumentParser specific options can be passed using kwargs:
77+
https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser
78+
Return a new dict instance. A ValueError is raised in case of failure.
79+
"""
80+
return cls(s, format="cli", **kwargs)
81+
7282
@classmethod
7383
def from_csv(cls, s, columns=None, columns_row=True, **kwargs):
7484
"""
@@ -173,16 +183,6 @@ def from_yaml(cls, s, **kwargs):
173183
"""
174184
return cls(s, format="yaml", **kwargs)
175185

176-
@classmethod
177-
def from_cli(cls, s, **kwargs):
178-
"""
179-
Load and decode data from a string of CLI arguments.
180-
ArgumentParser specific options can be passed using kwargs:
181-
https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser
182-
Return a new dict instance. A ValueError is raised in case of failure.
183-
"""
184-
return cls(s, format="cli", **kwargs)
185-
186186
def to_base64(self, subformat="json", encoding="utf-8", **kwargs):
187187
"""
188188
Encode the current dict instance in Base64 format

0 commit comments

Comments
 (0)