• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

earwig / mwparserfromhell / 15962349696

30 Jun 2025 02:19AM UTC coverage: 98.662% (-0.2%) from 98.886%
15962349696

push

github

earwig
Fix coverage action and add pre-commit hook action

3097 of 3139 relevant lines covered (98.66%)

9.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/src/mwparserfromhell/__init__.py
1
# Copyright (C) 2012-2025 Ben Kurtovic <ben.kurtovic@gmail.com>
2
#
3
# Permission is hereby granted, free of charge, to any person obtaining a copy
4
# of this software and associated documentation files (the "Software"), to deal
5
# in the Software without restriction, including without limitation the rights
6
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
# copies of the Software, and to permit persons to whom the Software is
8
# furnished to do so, subject to the following conditions:
9
#
10
# The above copyright notice and this permission notice shall be included in
11
# all copies or substantial portions of the Software.
12
#
13
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
# SOFTWARE.
20

21
"""
22
`mwparserfromhell <https://github.com/earwig/mwparserfromhell>`_ (the MediaWiki
23
Parser from Hell) is a Python package that provides an easy-to-use and
24
outrageously powerful parser for `MediaWiki <https://www.mediawiki.org>`_ wikicode.
25
"""
26

27
from __future__ import annotations
10✔
28

29
from importlib.metadata import PackageNotFoundError, version
10✔
30

31
__author__ = "Ben Kurtovic"
10✔
32
__copyright__ = "Copyright (C) 2012-2025 Ben Kurtovic"
10✔
33
__license__ = "MIT License"
10✔
34
__email__ = "ben.kurtovic@gmail.com"
10✔
35
try:
10✔
36
    __version__ = version("mwparserfromhell")
10✔
37
except PackageNotFoundError:
×
38
    __version__ = "0.0.0"
×
39

40
__all__ = [
10✔
41
    "definitions",
42
    "nodes",
43
    "parser",
44
    "smart_list",
45
    "string_mixin",
46
    "utils",
47
    "wikicode",
48
    "parse",
49
]
50

51
from . import definitions, nodes, parser, smart_list, string_mixin, utils, wikicode
10✔
52

53
parse = utils.parse_anything
10✔
54

55
del PackageNotFoundError
10✔
56
del version
10✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc