import atexit
import getopt
import inspect
import io
import json
import os
import platform
import sys
import tempfile
import traceback
from os import path as op
from shutil import rmtree
from typing import Mapping

import numpy as np

from .event import EmitterGroup, Event, EventEmitter
from .logs import logger, set_log_level, use_log_level

# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.

file_types: list = ...
file_types = ...

config: None = ...
_data_path: None = ...
_allowed_config_keys: None = ...

def _init(): ...

###############################################################################
# Command line flag parsing

VISPY_HELP: str = ...

def _parse_command_line_arguments(): ...

###############################################################################
# CONFIG

# Adapted from pyzolib/paths.py:
# https://bitbucket.org/pyzo/pyzolib/src/tip/paths.py
def _get_vispy_app_dir(): ...

class ConfigEvent(Event):
    def __init__(self, changes): ...

class Config(object):
    def __init__(self, **kwargs): ...
    def __getitem__(self, item): ...
    def __setitem__(self, item, val): ...
    def _check_key_val(self, key, val): ...
    def update(self, **kwargs): ...
    def __repr__(self): ...

def get_config_keys() -> Mapping: ...
def _get_config_fname(): ...
def _load_config(): ...
def save_config(**kwargs): ...
def set_data_dir(directory: str | None = None, create: bool = False, save: bool = False): ...
def _enable_profiling(): ...

_profiler: None = ...

def _profile_atexit(): ...
def sys_info(fname: str | None = None, overwrite: bool = False) -> str: ...

class _TempDir(str):
    def __new__(self): ...
    def __init__(self): ...
    def cleanup(self): ...
