textparser 0.26.1__tar.gz → 0.26.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {textparser-0.26.1 → textparser-0.26.2}/.github/workflows/pythonpackage.yml +1 -1
  2. {textparser-0.26.1 → textparser-0.26.2}/PKG-INFO +1 -1
  3. {textparser-0.26.1 → textparser-0.26.2}/docs/conf.py +104 -86
  4. {textparser-0.26.1 → textparser-0.26.2}/docs/index.rst +6 -0
  5. {textparser-0.26.1 → textparser-0.26.2}/docs/requirements.txt +1 -0
  6. {textparser-0.26.1 → textparser-0.26.2}/textparser/version.py +3 -3
  7. {textparser-0.26.1 → textparser-0.26.2}/textparser.egg-info/PKG-INFO +1 -1
  8. {textparser-0.26.1 → textparser-0.26.2}/.github/FUNDING.yml +0 -0
  9. {textparser-0.26.1 → textparser-0.26.2}/.gitignore +0 -0
  10. {textparser-0.26.1 → textparser-0.26.2}/.readthedocs.yml +0 -0
  11. {textparser-0.26.1 → textparser-0.26.2}/LICENSE +0 -0
  12. {textparser-0.26.1 → textparser-0.26.2}/README.rst +0 -0
  13. {textparser-0.26.1 → textparser-0.26.2}/docs/Makefile +0 -0
  14. {textparser-0.26.1 → textparser-0.26.2}/docs/make.bat +0 -0
  15. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/data.json +0 -0
  16. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/errors.py +0 -0
  17. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parse_tree.py +0 -0
  18. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/__init__.py +0 -0
  19. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/funcparserlib_json.py +0 -0
  20. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/lark_json.py +0 -0
  21. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/parsimonious_json.py +0 -0
  22. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/parsita_json.py +0 -0
  23. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/parsy_json.py +0 -0
  24. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/pyleri_json.py +0 -0
  25. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/pyparsing_json.py +0 -0
  26. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/textparser_json.py +0 -0
  27. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/parsers/textx_json.py +0 -0
  28. {textparser-0.26.1 → textparser-0.26.2}/examples/benchmarks/json/speed.py +0 -0
  29. {textparser-0.26.1 → textparser-0.26.2}/examples/hello_world.py +0 -0
  30. {textparser-0.26.1 → textparser-0.26.2}/examples/json.py +0 -0
  31. {textparser-0.26.1 → textparser-0.26.2}/examples/proto3.py +0 -0
  32. {textparser-0.26.1 → textparser-0.26.2}/pyproject.toml +0 -0
  33. {textparser-0.26.1 → textparser-0.26.2}/setup.cfg +0 -0
  34. {textparser-0.26.1 → textparser-0.26.2}/tests/__init__.py +0 -0
  35. {textparser-0.26.1 → textparser-0.26.2}/tests/test_textparser.py +0 -0
  36. {textparser-0.26.1 → textparser-0.26.2}/textparser/__init__.py +0 -0
  37. {textparser-0.26.1 → textparser-0.26.2}/textparser/py.typed +0 -0
  38. {textparser-0.26.1 → textparser-0.26.2}/textparser.egg-info/SOURCES.txt +0 -0
  39. {textparser-0.26.1 → textparser-0.26.2}/textparser.egg-info/dependency_links.txt +0 -0
  40. {textparser-0.26.1 → textparser-0.26.2}/textparser.egg-info/requires.txt +0 -0
  41. {textparser-0.26.1 → textparser-0.26.2}/textparser.egg-info/top_level.txt +0 -0
@@ -47,7 +47,7 @@ jobs:
47
47
  pip install -e .
48
48
  - name: Build documentation
49
49
  run: |
50
- python -m sphinx -b html -Ean --keep-going docs build
50
+ python -m sphinx -b html -Wan --keep-going docs build
51
51
 
52
52
  release:
53
53
  needs: [test]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: textparser
3
- Version: 0.26.1
3
+ Version: 0.26.2
4
4
  Summary: A text parser library for python.
5
5
  Author: Erik Moqvist
6
6
  License-Expression: MIT
@@ -1,5 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
1
  # textparser documentation build configuration file, created by
4
2
  # sphinx-quickstart on Sat Apr 25 11:54:09 2015.
5
3
  #
@@ -12,98 +10,102 @@
12
10
  # All configuration values have a default; values that are commented out
13
11
  # serve to show the default.
14
12
 
15
- import sys
13
+ import datetime
16
14
  import os
17
- import shlex
15
+ import sys
16
+ from importlib.metadata import version as get_version
18
17
 
19
18
  # If extensions (or modules to document with autodoc) are in another directory,
20
19
  # add these directories to sys.path here. If the directory is relative to the
21
20
  # documentation root, use os.path.abspath to make it absolute, like shown here.
22
- sys.path.insert(0, os.path.abspath('..'))
23
-
24
- import textparser
21
+ sys.path.insert(0, os.path.abspath(".."))
25
22
 
26
23
  # -- General configuration ------------------------------------------------
27
24
 
28
25
  # If your documentation needs a minimal Sphinx version, state it here.
29
- #needs_sphinx = '1.0'
26
+ # needs_sphinx = '1.0'
30
27
 
31
28
  # Add any Sphinx extension module names here, as strings. They can be
32
29
  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33
30
  # ones.
34
31
  extensions = [
35
- 'sphinx.ext.autodoc',
36
- 'sphinx.ext.viewcode',
32
+ "sphinx.ext.autodoc",
33
+ "sphinx.ext.viewcode",
34
+ "sphinx.ext.intersphinx",
35
+ "sphinx_copybutton",
37
36
  ]
38
37
 
38
+ # create links to external docs
39
+ intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
40
+
39
41
  # Add any paths that contain templates here, relative to this directory.
40
- templates_path = ['_templates']
42
+ templates_path = ["_templates"]
41
43
 
42
44
  # The suffix(es) of source filenames.
43
45
  # You can specify multiple suffix as a list of string:
44
46
  # source_suffix = ['.rst', '.md']
45
- source_suffix = '.rst'
47
+ source_suffix = ".rst"
46
48
 
47
49
  # The encoding of source files.
48
- #source_encoding = 'utf-8-sig'
50
+ # source_encoding = 'utf-8-sig'
49
51
 
50
52
  # The master toctree document.
51
- master_doc = 'index'
53
+ master_doc = "index"
52
54
 
53
55
  # General information about the project.
54
- project = u'textparser'
55
- copyright = u'2018-2019, Erik Moqvist'
56
- author = u'Erik Moqvist'
56
+ project = "textparser"
57
+ copyright = f"2018-{datetime.datetime.now().year}, Erik Moqvist"
58
+ author = "Erik Moqvist"
57
59
 
58
60
  # The version info for the project you're documenting, acts as replacement for
59
61
  # |version| and |release|, also used in various other places throughout the
60
62
  # built documents.
61
63
  #
62
- # The short X.Y version.
63
- version = textparser.__version__
64
64
  # The full version, including alpha/beta/rc tags.
65
- release = textparser.__version__
65
+ release: str = get_version("textparser")
66
+ # The short X.Y version.
67
+ version = ".".join(release.split(".")[:2])
66
68
 
67
69
  # The language for content autogenerated by Sphinx. Refer to documentation
68
70
  # for a list of supported languages.
69
71
  #
70
72
  # This is also used if you do content translation via gettext catalogs.
71
73
  # Usually you set "language" from the command line for these cases.
72
- language = None
74
+ language = "en"
73
75
 
74
76
  # There are two options for replacing |today|: either, you set today to some
75
77
  # non-false value, then it is used:
76
- #today = ''
78
+ # today = ''
77
79
  # Else, today_fmt is used as the format for a strftime call.
78
- #today_fmt = '%B %d, %Y'
80
+ # today_fmt = '%B %d, %Y'
79
81
 
80
82
  # List of patterns, relative to source directory, that match files and
81
83
  # directories to ignore when looking for source files.
82
- exclude_patterns = ['_build']
84
+ exclude_patterns = ["_build"]
83
85
 
84
86
  # The reST default role (used for this markup: `text`) to use for all
85
87
  # documents.
86
- #default_role = None
88
+ # default_role = None
87
89
 
88
90
  # If true, '()' will be appended to :func: etc. cross-reference text.
89
- #add_function_parentheses = True
91
+ # add_function_parentheses = True
90
92
 
91
93
  # If true, the current module name will be prepended to all description
92
94
  # unit titles (such as .. function::).
93
- #add_module_names = True
95
+ # add_module_names = True
94
96
 
95
97
  # If true, sectionauthor and moduleauthor directives will be shown in the
96
98
  # output. They are ignored by default.
97
- #show_authors = False
99
+ # show_authors = False
98
100
 
99
101
  # The name of the Pygments (syntax highlighting) style to use.
100
- pygments_style = 'sphinx'
102
+ pygments_style = "sphinx"
101
103
 
102
104
  # A list of ignored prefixes for module index sorting.
103
- #modindex_common_prefix = []
105
+ # modindex_common_prefix = []
104
106
 
105
107
  # If true, keep warnings as "system message" paragraphs in the built documents.
106
- #keep_warnings = False
108
+ # keep_warnings = False
107
109
 
108
110
  # If true, `todo` and `todoList` produce output, else they produce nothing.
109
111
  todo_include_todos = False
@@ -113,143 +115,145 @@ todo_include_todos = False
113
115
 
114
116
  # The theme to use for HTML and HTML Help pages. See the documentation for
115
117
  # a list of builtin themes.
116
- html_theme = 'sphinx_rtd_theme'
118
+ html_theme = "sphinx_rtd_theme"
117
119
 
118
120
  # Theme options are theme-specific and customize the look and feel of a theme
119
121
  # further. For a list of options available for each theme, see the
120
122
  # documentation.
121
- #html_theme_options = {}
123
+ # html_theme_options = {}
122
124
 
123
125
  # Add any paths that contain custom themes here, relative to this directory.
124
- #html_theme_path = []
126
+ # html_theme_path = []
125
127
 
126
128
  # The name for this set of Sphinx documents. If None, it defaults to
127
129
  # "<project> v<release> documentation".
128
- #html_title = None
130
+ # html_title = None
129
131
 
130
132
  # A shorter title for the navigation bar. Default is the same as html_title.
131
- #html_short_title = None
133
+ # html_short_title = None
132
134
 
133
135
  # The name of an image file (relative to this directory) to place at the top
134
136
  # of the sidebar.
135
- #html_logo = None
137
+ # html_logo = None
136
138
 
137
139
  # The name of an image file (within the static path) to use as favicon of the
138
140
  # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
139
141
  # pixels large.
140
- #html_favicon = None
142
+ # html_favicon = None
141
143
 
142
144
  # Add any paths that contain custom static files (such as style sheets) here,
143
145
  # relative to this directory. They are copied after the builtin static files,
144
146
  # so a file named "default.css" will overwrite the builtin "default.css".
145
- html_static_path = ['_static']
147
+ # html_static_path = ['_static']
146
148
 
147
149
  # Add any extra paths that contain custom files (such as robots.txt or
148
150
  # .htaccess) here, relative to this directory. These files are copied
149
151
  # directly to the root of the documentation.
150
- #html_extra_path = []
152
+ # html_extra_path = []
151
153
 
152
154
  # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
153
155
  # using the given strftime format.
154
- #html_last_updated_fmt = '%b %d, %Y'
156
+ # html_last_updated_fmt = '%b %d, %Y'
155
157
 
156
158
  # If true, SmartyPants will be used to convert quotes and dashes to
157
159
  # typographically correct entities.
158
- #html_use_smartypants = True
160
+ # html_use_smartypants = True
159
161
 
160
162
  # Custom sidebar templates, maps document names to template names.
161
- #html_sidebars = {}
163
+ # html_sidebars = {}
162
164
 
163
165
  # Additional templates that should be rendered to pages, maps page names to
164
166
  # template names.
165
- #html_additional_pages = {}
167
+ # html_additional_pages = {}
166
168
 
167
169
  # If false, no module index is generated.
168
- #html_domain_indices = True
170
+ # html_domain_indices = True
169
171
 
170
172
  # If false, no index is generated.
171
- #html_use_index = True
173
+ # html_use_index = True
172
174
 
173
175
  # If true, the index is split into individual pages for each letter.
174
- #html_split_index = False
176
+ # html_split_index = False
175
177
 
176
178
  # If true, links to the reST sources are added to the pages.
177
- #html_show_sourcelink = True
179
+ # html_show_sourcelink = True
178
180
 
179
181
  # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
180
- #html_show_sphinx = True
182
+ # html_show_sphinx = True
181
183
 
182
184
  # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
183
- #html_show_copyright = True
185
+ # html_show_copyright = True
184
186
 
185
187
  # If true, an OpenSearch description file will be output, and all pages will
186
188
  # contain a <link> tag referring to it. The value of this option must be the
187
189
  # base URL from which the finished HTML is served.
188
- #html_use_opensearch = ''
190
+ # html_use_opensearch = ''
189
191
 
190
192
  # This is the file name suffix for HTML files (e.g. ".xhtml").
191
- #html_file_suffix = None
193
+ # html_file_suffix = None
192
194
 
193
195
  # Language to be used for generating the HTML full-text search index.
194
196
  # Sphinx supports the following languages:
195
197
  # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
196
198
  # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
197
- #html_search_language = 'en'
199
+ # html_search_language = 'en'
198
200
 
199
201
  # A dictionary with options for the search language support, empty by default.
200
202
  # Now only 'ja' uses this config value
201
- #html_search_options = {'type': 'default'}
203
+ # html_search_options = {'type': 'default'}
202
204
 
203
205
  # The name of a javascript file (relative to the configuration directory) that
204
206
  # implements a search results scorer. If empty, the default will be used.
205
- #html_search_scorer = 'scorer.js'
207
+ # html_search_scorer = 'scorer.js'
206
208
 
207
209
  # Output file base name for HTML help builder.
208
- htmlhelp_basename = 'textparserdoc'
210
+ htmlhelp_basename = "textparserdoc"
209
211
 
210
212
  # -- Options for LaTeX output ---------------------------------------------
211
213
 
212
214
  latex_elements = {
213
- # The paper size ('letterpaper' or 'a4paper').
214
- #'papersize': 'letterpaper',
215
-
216
- # The font size ('10pt', '11pt' or '12pt').
217
- #'pointsize': '10pt',
218
-
219
- # Additional stuff for the LaTeX preamble.
220
- #'preamble': '',
221
-
222
- # Latex figure (float) alignment
223
- #'figure_align': 'htbp',
215
+ # The paper size ('letterpaper' or 'a4paper').
216
+ #'papersize': 'letterpaper',
217
+ # The font size ('10pt', '11pt' or '12pt').
218
+ #'pointsize': '10pt',
219
+ # Additional stuff for the LaTeX preamble.
220
+ #'preamble': '',
221
+ # Latex figure (float) alignment
222
+ #'figure_align': 'htbp',
224
223
  }
225
224
 
226
225
  # Grouping the document tree into LaTeX files. List of tuples
227
226
  # (source start file, target name, title,
228
227
  # author, documentclass [howto, manual, or own class]).
229
228
  latex_documents = [
230
- (master_doc, 'textparser.tex', u'textparser Documentation',
231
- u'Erik Moqvist', 'manual'),
229
+ (
230
+ master_doc,
231
+ "textparser.tex",
232
+ "textparser Documentation",
233
+ "Erik Moqvist",
234
+ "manual",
235
+ ),
232
236
  ]
233
237
 
234
238
  # The name of an image file (relative to this directory) to place at the top of
235
239
  # the title page.
236
- #latex_logo = None
240
+ # latex_logo = None
237
241
 
238
242
  # For "manual" documents, if this is true, then toplevel headings are parts,
239
243
  # not chapters.
240
- #latex_use_parts = False
244
+ # latex_use_parts = False
241
245
 
242
246
  # If true, show page references after internal links.
243
- #latex_show_pagerefs = False
247
+ # latex_show_pagerefs = False
244
248
 
245
249
  # If true, show URL addresses after external links.
246
- #latex_show_urls = False
250
+ # latex_show_urls = False
247
251
 
248
252
  # Documents to append as an appendix to all manuals.
249
- #latex_appendices = []
253
+ # latex_appendices = []
250
254
 
251
255
  # If false, no module index is generated.
252
- #latex_domain_indices = True
256
+ # latex_domain_indices = True
253
257
 
254
258
 
255
259
  # -- Options for manual page output ---------------------------------------
@@ -257,12 +261,11 @@ latex_documents = [
257
261
  # One entry per manual page. List of tuples
258
262
  # (source start file, name, description, authors, manual section).
259
263
  man_pages = [
260
- (master_doc, 'textparser', u'Textparser Documentation',
261
- [author], 1)
264
+ (master_doc, "textparser", "Textparser Documentation", [author], 1)
262
265
  ]
263
266
 
264
267
  # If true, show URL addresses after external links.
265
- #man_show_urls = False
268
+ # man_show_urls = False
266
269
 
267
270
 
268
271
  # -- Options for Texinfo output -------------------------------------------
@@ -271,21 +274,36 @@ man_pages = [
271
274
  # (source start file, target name, title, author,
272
275
  # dir menu entry, description, category)
273
276
  texinfo_documents = [
274
- (master_doc, 'textparser', u'Textparser Documentation',
275
- author, 'textparser', 'One line description of project.',
276
- 'Miscellaneous'),
277
+ (
278
+ master_doc,
279
+ "textparser",
280
+ "Textparser Documentation",
281
+ author,
282
+ "textparser",
283
+ "One line description of project.",
284
+ "Miscellaneous",
285
+ ),
277
286
  ]
278
287
 
279
288
  # Documents to append as an appendix to all manuals.
280
- #texinfo_appendices = []
289
+ # texinfo_appendices = []
281
290
 
282
291
  # If false, no module index is generated.
283
- #texinfo_domain_indices = True
292
+ # texinfo_domain_indices = True
284
293
 
285
294
  # How to display URL addresses: 'footnote', 'no', or 'inline'.
286
- #texinfo_show_urls = 'footnote'
295
+ # texinfo_show_urls = 'footnote'
287
296
 
288
297
  # If true, do not generate a @detailmenu in the "Top" node's menu.
289
- #texinfo_no_detailmenu = False
298
+ # texinfo_no_detailmenu = False
290
299
 
291
- autodoc_member_order = 'bysource'
300
+ autodoc_member_order = "bysource"
301
+
302
+ # location of typehints
303
+ autodoc_typehints = "description"
304
+ autodoc_type_aliases = {}
305
+
306
+ # disable specific warnings
307
+ nitpick_ignore = [
308
+ ("py:class", "textparser._Tokens"),
309
+ ]
@@ -75,6 +75,12 @@ Here is a fictitious example grammar:
75
75
  .. autoclass:: textparser.Pattern
76
76
  :members:
77
77
 
78
+ .. autoclass:: textparser.MatchObject
79
+
80
+ .. autoclass:: textparser.Grammar
81
+
82
+ .. autoclass:: textparser.Token
83
+
78
84
  .. autodata:: textparser.MISMATCH
79
85
 
80
86
  Exceptions
@@ -1,2 +1,3 @@
1
1
  Sphinx==9.*
2
2
  sphinx_rtd_theme
3
+ sphinx-copybutton
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.26.1'
22
- __version_tuple__ = version_tuple = (0, 26, 1)
21
+ __version__ = version = '0.26.2'
22
+ __version_tuple__ = version_tuple = (0, 26, 2)
23
23
 
24
- __commit_id__ = commit_id = 'g4f946b2f4'
24
+ __commit_id__ = commit_id = 'gddd6812d8'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: textparser
3
- Version: 0.26.1
3
+ Version: 0.26.2
4
4
  Summary: A text parser library for python.
5
5
  Author: Erik Moqvist
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes