{
    "content": [
        {
            "type": "text",
            "text": "# warnings (pydoc)\n\n**Summary:** warnings - Python part of the warnings subsystem.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **CLASSES** (3 lines) — 1 subsections\n  - class catch_warnings (40 lines)\n- **FUNCTIONS** (1 lines) — 7 subsections\n  - filterwarnings (10 lines)\n  - formatwarning (2 lines)\n  - resetwarnings (2 lines)\n  - showwarning (2 lines)\n  - simplefilter (9 lines)\n  - warn (2 lines)\n  - warn_explicit (2 lines)\n- **DATA** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nwarnings - Python part of the warnings subsystem.\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/warnings.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### CLASSES\n\nbuiltins.object\ncatchwarnings\n\n#### class catch_warnings\n\n|  catchwarnings(*, record=False, module=None)\n|\n|  A context manager that copies and restores the warnings filter upon\n|  exiting the context.\n|\n|  The 'record' argument specifies whether warnings should be captured by a\n|  custom implementation of warnings.showwarning() and be appended to a list\n|  returned by the context manager. Otherwise None is returned by the context\n|  manager. The objects appended to the list are arguments whose attributes\n|  mirror the arguments to showwarning().\n|\n|  The 'module' argument is to specify an alternative module to the module\n|  named 'warnings' and imported under that name. This argument is only useful\n|  when testing the warnings module itself.\n|\n|  Methods defined here:\n|\n|  enter(self)\n|\n|  exit(self, *excinfo)\n|\n|  init(self, *, record=False, module=None)\n|      Specify whether to record warnings and if an alternative module\n|      should be used other than sys.modules['warnings'].\n|\n|      For compatibility with Python 3.0, please consider all arguments to be\n|      keyword-only.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n### FUNCTIONS\n\n#### filterwarnings\n\nInsert an entry into the list of warnings filters (at the front).\n\n'action' -- one of \"error\", \"ignore\", \"always\", \"default\", \"module\",\nor \"once\"\n'message' -- a regex that the warning message must match\n'category' -- a class that the warning must be a subclass of\n'module' -- a regex that the module name must match\n'lineno' -- an integer line number, 0 matches all warnings\n'append' -- if true, append to the list of filters\n\n#### formatwarning\n\nFunction to format a warning the standard way.\n\n#### resetwarnings\n\nClear the list of warning filters, so that no filters are active.\n\n#### showwarning\n\nHook to write a warning to a file; replace if you like.\n\n#### simplefilter\n\nInsert a simple entry into the list of warnings filters (at the front).\n\nA simple filter matches all modules and messages.\n'action' -- one of \"error\", \"ignore\", \"always\", \"default\", \"module\",\nor \"once\"\n'category' -- a class that the warning must be a subclass of\n'lineno' -- an integer line number, 0 matches all warnings\n'append' -- if true, append to the list of filters\n\n#### warn\n\nIssue a warning, or maybe ignore it or raise an exception.\n\n#### warn_explicit\n\nLow-level interface to warnings functionality.\n\n### DATA\n\nall = ['warn', 'warnexplicit', 'showwarning', 'formatwarning', 'f...\n\n### FILE\n\n/usr/lib/python3.10/warnings.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "warnings",
        "section": "",
        "mode": "pydoc",
        "summary": "warnings - Python part of the warnings subsystem.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 3,
                "subsections": [
                    {
                        "name": "class catch_warnings",
                        "lines": 40
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "filterwarnings",
                        "lines": 10
                    },
                    {
                        "name": "formatwarning",
                        "lines": 2
                    },
                    {
                        "name": "resetwarnings",
                        "lines": 2
                    },
                    {
                        "name": "showwarning",
                        "lines": 2
                    },
                    {
                        "name": "simplefilter",
                        "lines": 9
                    },
                    {
                        "name": "warn",
                        "lines": 2
                    },
                    {
                        "name": "warn_explicit",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}