Skip to content

Commit

Permalink
Apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Apr 13, 2024
1 parent b58aa2a commit 38e107f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions yq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,21 @@ def decode_docs(jq_output, json_decoder):
jq_output = jq_output[pos + 1 :]
yield doc


def get_toml_loader():
if sys.version_info >= (3, 11):
import tomllib as _toml_loader
else:
import tomli as _toml_loader
return _toml_loader


def get_xmltodict_parser():
import xmltodict

return xmltodict


def xq_cli():
cli(input_format="xml", program_name="xq")

Expand Down Expand Up @@ -313,6 +317,7 @@ def yq(
prog=program_name,
)
elif input_format == "xml":

def emit_entry(path, entry):
json.dump(entry, jq.stdin) # type: ignore
jq.stdin.write("\n") # type: ignore
Expand Down

0 comments on commit 38e107f

Please sign in to comment.