Skip to content

Commit d737811

Browse files
committed
fix: some more fixes
1 parent e371a9c commit d737811

21 files changed

+603
-304
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,3 @@ jobs:
152152
153153
- name: Run mypy
154154
run: mypy json2xml tests
155-

HISTORY.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,4 +450,3 @@ v3.0.0 / 2019-02-26
450450
* Cleanup Readme.md
451451
* Update issue templates
452452
* fix vulnerabilities in requests
453-

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,3 @@ dist: clean ## builds source and wheel package
9595

9696
install: clean ## install the package to the active Python's site-packages
9797
python setup.py install
98-

README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ However, you can change this behavior using the item_wrap property like this:
139139
from json2xml import json2xml
140140
from json2xml.utils import readfromurl, readfromstring, readfromjson
141141
142-
data = readfromstring('{"my_items":[{"my_item":{"id":1} },{"my_item":{"id":2} }],"my_str_items":["a","b"]}')
142+
data = readfromstring(
143+
'{"my_items":[{"my_item":{"id":1} },{"my_item":{"id":2} }],"my_str_items":["a","b"]}'
144+
)
143145
print(json2xml.Json2xml(data, item_wrap=False).to_xml())
144146
145147
Outputs this:
@@ -201,7 +203,7 @@ This project uses modern Python development practices. Here's how to set up a de
201203
# Create and activate virtual environment (using uv - recommended)
202204
uv venv
203205
source .venv/bin/activate # On Windows: .venv\Scripts\activate
204-
206+
205207
# Install dependencies
206208
uv pip install -r requirements-dev.txt
207209
uv pip install -e .
@@ -241,4 +243,3 @@ Help and Support to maintain this project
241243
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
242244

243245
- You can sponsor my work for this plugin here: https://github.com/sponsors/vinitkumar/
244-

dev.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,18 @@ def main() -> None:
3131
success &= run_command(["ruff", "check", "json2xml", "tests"], "Linting")
3232

3333
if command in ("test", "all"):
34-
success &= run_command([
35-
"pytest", "--cov=json2xml", "--cov-report=term",
36-
"-xvs", "tests", "-n", "auto"
37-
], "Tests")
34+
success &= run_command(
35+
[
36+
"pytest",
37+
"--cov=json2xml",
38+
"--cov-report=term",
39+
"-xvs",
40+
"tests",
41+
"-n",
42+
"auto",
43+
],
44+
"Tests",
45+
)
3846

3947
if command in ("typecheck", "all"):
4048
success &= run_command(["mypy", "json2xml", "tests"], "Type checking")

docs/conf.py

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import os
2222
import sys
2323

24-
sys.path.insert(0, os.path.abspath('..'))
24+
sys.path.insert(0, os.path.abspath(".."))
2525

2626
import json2xml
2727

@@ -35,23 +35,23 @@
3535

3636
# Add any Sphinx extension module names here, as strings. They can be
3737
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
38-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
38+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
3939

4040
# Add any paths that contain templates here, relative to this directory.
41-
templates_path = ['_templates']
41+
templates_path = ["_templates"]
4242

4343
# The suffix(es) of source filenames.
4444
# You can specify multiple suffix as a list of string:
4545
#
4646
# source_suffix = ['.rst', '.md']
47-
source_suffix = '.rst'
47+
source_suffix = ".rst"
4848

4949
# The master toctree document.
50-
master_doc = 'index'
50+
master_doc = "index"
5151

5252
# General information about the project.
53-
project = 'json2xml'
54-
copyright = f'{year}, Vinit Kumar'
53+
project = "json2xml"
54+
copyright = f"{year}, Vinit Kumar"
5555
author = "Vinit Kumar"
5656

5757
# The version info for the project you're documenting, acts as replacement
@@ -73,10 +73,10 @@
7373
# List of patterns, relative to source directory, that match files and
7474
# directories to ignore when looking for source files.
7575
# This patterns also effect to html_static_path and html_extra_path
76-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
76+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7777

7878
# The name of the Pygments (syntax highlighting) style to use.
79-
pygments_style = 'sphinx'
79+
pygments_style = "sphinx"
8080

8181
# If true, `todo` and `todoList` produce output, else they produce nothing.
8282
todo_include_todos = False
@@ -87,7 +87,7 @@
8787
# The theme to use for HTML and HTML Help pages. See the documentation for
8888
# a list of builtin themes.
8989
#
90-
html_theme = 'furo'
90+
html_theme = "furo"
9191

9292
# Theme options are theme-specific and customize the look and feel of a
9393
# theme further. For a list of options available for each theme, see the
@@ -98,13 +98,13 @@
9898
# Add any paths that contain custom static files (such as style sheets) here,
9999
# relative to this directory. They are copied after the builtin static files,
100100
# so a file named "default.css" will overwrite the builtin "default.css".
101-
html_static_path = ['_static']
101+
html_static_path = ["_static"]
102102

103103

104104
# -- Options for HTMLHelp output ---------------------------------------
105105

106106
# Output file base name for HTML help builder.
107-
htmlhelp_basename = 'json2xmldoc'
107+
htmlhelp_basename = "json2xmldoc"
108108

109109

110110
# -- Options for LaTeX output ------------------------------------------
@@ -113,15 +113,12 @@
113113
# The paper size ('letterpaper' or 'a4paper').
114114
#
115115
# 'papersize': 'letterpaper',
116-
117116
# The font size ('10pt', '11pt' or '12pt').
118117
#
119118
# 'pointsize': '10pt',
120-
121119
# Additional stuff for the LaTeX preamble.
122120
#
123121
# 'preamble': '',
124-
125122
# Latex figure (float) alignment
126123
#
127124
# 'figure_align': 'htbp',
@@ -131,21 +128,15 @@
131128
# (source start file, target name, title, author, documentclass
132129
# [howto, manual, or own class]).
133130
latex_documents = [
134-
(master_doc, 'json2xml.tex',
135-
'json2xml Documentation',
136-
'Vinit Kumar', 'manual'),
131+
(master_doc, "json2xml.tex", "json2xml Documentation", "Vinit Kumar", "manual"),
137132
]
138133

139134

140135
# -- Options for manual page output ------------------------------------
141136

142137
# One entry per manual page. List of tuples
143138
# (source start file, name, description, authors, manual section).
144-
man_pages = [
145-
(master_doc, 'json2xml',
146-
'json2xml Documentation',
147-
[author], 1)
148-
]
139+
man_pages = [(master_doc, "json2xml", "json2xml Documentation", [author], 1)]
149140

150141

151142
# -- Options for Texinfo output ----------------------------------------
@@ -154,13 +145,13 @@
154145
# (source start file, target name, title, author,
155146
# dir menu entry, description, category)
156147
texinfo_documents = [
157-
(master_doc, 'json2xml',
158-
'json2xml Documentation',
159-
author,
160-
'json2xml',
161-
'One line description of project.',
162-
'Miscellaneous'),
148+
(
149+
master_doc,
150+
"json2xml",
151+
"json2xml Documentation",
152+
author,
153+
"json2xml",
154+
"One line description of project.",
155+
"Miscellaneous",
156+
),
163157
]
164-
165-
166-

examples/bigexample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@
102102
"entity_status": "",
103103
"art_unit": ""
104104
}
105-
]
105+
]

examples/wrongjson.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,5 +368,5 @@
368368
}
369369
}
370370
]
371-
372-
371+
372+

json2xml/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
__author__ = """Vinit Kumar"""
44
__email__ = "[email protected]"
55
__version__ = "5.2.1"
6-

0 commit comments

Comments
 (0)