# packages

package: 30fcd23745efe32ce681__mypyc
path:
/opt/pyenv/versions/3.12.12/lib/python3.12/site-packages/30fcd23745efe32ce681__mypyc.cpython-312-x86_64-linux-gnu.so


package: fd7dcdb10166ebd4db98__mypyc
path:
/opt/pyenv/versions/3.12.12/lib/python3.12/site-packages/fd7dcdb10166ebd4db98__mypyc.cpython-312-x86_64-linux-gnu.so


package: setproctitle
path:
/opt/pyenv/versions/3.12.12/lib/python3.12/site-packages/setproctitle.cpython-312-x86_64-linux-gnu.so


# metadata

version_hash: fbe18072daba291dfa51bafd183a53f1cab23a5e40a89f92f07af27bdd501c3a
created_at: 2026-04-17T23:00:40.156530
hash_data:
{"version_data": "1.14.0", "prefs_data": "{\n  \"autoimport\": {\n    \"aliases\": [\n      [\n        \"np\",\n        \"numpy\"\n      ],\n      [\n        \"pd\",\n        \"pandas\"\n      ],\n      [\n        \"plt\",\n        \"matplotlib.pyplot\"\n      ],\n      [\n        \"sns\",\n        \"seaborn\"\n      ],\n      [\n        \"tf\",\n        \"tensorflow\"\n      ],\n      [\n        \"sk\",\n        \"sklearn\"\n      ],\n      [\n        \"sm\",\n        \"statsmodels\"\n      ]\n    ]\n  },\n  \"automatic_soa\": true,\n  \"compress_history\": false,\n  \"compress_objectdb\": false,\n  \"extension_modules\": [\n    \"OpenGL\",\n    \"PIL\",\n    \"array\",\n    \"audioop\",\n    \"binascii\",\n    \"cPickle\",\n    \"cStringIO\",\n    \"cmath\",\n    \"collections\",\n    \"datetime\",\n    \"errno\",\n    \"exceptions\",\n    \"gc\",\n    \"imageop\",\n    \"imp\",\n    \"itertools\",\n    \"marshal\",\n    \"math\",\n    \"matplotlib\",\n    \"mmap\",\n    \"mpmath\",\n    \"msvcrt\",\n    \"networkx\",\n    \"nose\",\n    \"nt\",\n    \"numpy\",\n    \"operator\",\n    \"os\",\n    \"os.path\",\n    \"pandas\",\n    \"parser\",\n    \"rgbimg\",\n    \"scipy\",\n    \"signal\",\n    \"skimage\",\n    \"sklearn\",\n    \"statsmodels\",\n    \"strop\",\n    \"sympy\",\n    \"sys\",\n    \"thread\",\n    \"time\",\n    \"wx\",\n    \"xxsubtype\",\n    \"zipimport\",\n    \"zlib\"\n  ],\n  \"ignore_bad_imports\": true,\n  \"ignore_syntax_errors\": true,\n  \"ignored_resources\": [\n    \"*.pyc\",\n    \"*~\",\n    \".ropeproject\",\n    \".hg\",\n    \".svn\",\n    \"_svn\",\n    \".git\",\n    \".tox\",\n    \".venv\",\n    \"venv\",\n    \".mypy_cache\",\n    \".pytest_cache\",\n    \"/home/abaddon/.config/newton/lsps/ropeproject\"\n  ],\n  \"import_dynload_stdmods\": true,\n  \"imports\": {\n    \"preferred_import_style\": \"default\"\n  },\n  \"indent_size\": 4,\n  \"max_history_items\": 32,\n  \"perform_doa\": true,\n  \"prefer_module_from_imports\": false,\n  \"pull_imports_to_top\": true,\n  \"py_version\": null,\n  \"python_files\": [\n    \"*.py\"\n  ],\n  \"python_path\": [],\n  \"save_history\": true,\n  \"save_objectdb\": false,\n  \"soa_followed_calls\": 0,\n  \"sort_imports_alphabetically\": false,\n  \"source_folders\": [],\n  \"split_imports\": false,\n  \"type_hinting_factory\": \"rope.base.oi.type_hinting.factory.default_type_hinting_factory\",\n  \"validate_objectdb\": false\n}", "schema_file_content": "from abc import ABC, abstractmethod\nfrom typing import Dict, List\n\n\nclass FinalQuery:\n    def __init__(self, query):\n        self._query = query\n\n    def __repr__(self):\n        return f'{self.__class__.__name__}(\"{self._query}\")'\n\n    def explain(self):\n        return FinalQuery(\"EXPLAIN QUERY PLAN \" + self._query)\n\n\nclass Query:\n    def __init__(self, query: str, columns: List[str]):\n        self.query = query\n        self.columns = columns\n\n    def __repr__(self):\n        return f'{self.__class__.__name__}(\"{self.query}\", columns={self.columns})'\n\n    def select(self, *columns: str):\n        if not (set(columns) <= set(self.columns)):\n            raise ValueError(\n                f\"Unknown column names passed: {set(columns) - set(self.columns)}\"\n            )\n\n        selected_columns = \", \".join(columns)\n        return FinalQuery(f\"SELECT {selected_columns} FROM {self.query}\")\n\n    def select_star(self):\n        return FinalQuery(f\"SELECT * FROM {self.query}\")\n\n    def where(self, where_clause: str):\n        return Query(\n            f\"{self.query} WHERE {where_clause}\",\n            columns=self.columns,\n        )\n\n    def insert_into(self) -> FinalQuery:\n        columns = \", \".join(self.columns)\n        placeholders = \", \".join([\"?\"] * len(self.columns))\n        return FinalQuery(\n            f\"INSERT INTO {self.query}({columns}) VALUES ({placeholders})\"\n        )\n\n    def drop_table(self) -> FinalQuery:\n        return FinalQuery(f\"DROP TABLE IF EXISTS {self.query}\")\n\n    def delete_from(self) -> FinalQuery:\n        return FinalQuery(f\"DELETE FROM {self.query}\")\n\n\nclass Model(ABC):\n    @property\n    @abstractmethod\n    def table_name(self) -> str: ...\n\n    @property\n    @abstractmethod\n    def schema(self) -> Dict[str, str]: ...\n\n    @classmethod\n    def create_table(cls, connection):\n        metadata_table = [\n            f\"{column_name} {column_type}\"\n            for column_name, column_type in cls.schema.items()\n        ]\n        metadata_table_definition = \", \".join(metadata_table)\n        connection.execute(\n            f\"CREATE TABLE IF NOT EXISTS {cls.table_name}({metadata_table_definition})\"\n        )\n\n\nclass Metadata(Model):\n    table_name = \"metadata\"\n\n    schema = {\n        \"version_hash\": \"TEXT\",\n        \"hash_data\": \"TEXT\",\n        \"created_at\": \"TEXT\",\n    }\n    columns = list(schema.keys())\n    objects = Query(table_name, columns)\n\n\nclass Alias(Model):\n    table_name = \"aliases\"\n    schema = {\n        \"alias\": \"TEXT\",\n        \"module\": \"TEXT\",\n    }\n    columns = list(schema.keys())\n    objects = Query(table_name, columns)\n\n    @classmethod\n    def create_table(cls, connection):\n        super().create_table(connection)\n        connection.execute(\n            \"CREATE INDEX IF NOT EXISTS aliases_alias_nocase ON aliases(alias COLLATE NOCASE)\"\n        )\n\n    modules = Query(\n        \"(SELECT DISTINCT aliases.*, package, source, type FROM aliases INNER JOIN names on aliases.module = names.module)\",\n        columns + [\"package\", \"source\", \"type\"],\n    )\n    search_modules_with_alias = modules.where(\"alias LIKE (?)\")\n\n\nclass Name(Model):\n    table_name = \"names\"\n    schema = {\n        \"name\": \"TEXT\",\n        \"module\": \"TEXT\",\n        \"package\": \"TEXT\",\n        \"source\": \"INTEGER\",\n        \"type\": \"INTEGER\",\n    }\n    columns = list(schema.keys())\n    objects = Query(table_name, columns)\n\n    @classmethod\n    def create_table(cls, connection):\n        super().create_table(connection)\n        # fmt: off\n        connection.execute(\"CREATE INDEX IF NOT EXISTS names_name ON names(name)\")\n        connection.execute(\"CREATE INDEX IF NOT EXISTS names_module ON names(module)\")\n        connection.execute(\"CREATE INDEX IF NOT EXISTS names_package ON names(package)\")\n        connection.execute(\"CREATE INDEX IF NOT EXISTS names_name_nocase ON names(name COLLATE NOCASE)\")\n        connection.execute(\"CREATE INDEX IF NOT EXISTS names_module_nocase ON names(module COLLATE NOCASE)\")\n        connection.execute(\"CREATE INDEX IF NOT EXISTS names_package_nocase ON names(package COLLATE NOCASE)\")\n        # fmt: on\n\n    search_submodule_like = objects.where('module LIKE (\"%.\" || ?)')\n    search_module_like = objects.where(\"module LIKE (?)\")\n\n    import_assist = objects.where(\"name LIKE (? || '%')\")\n\n    search_by_name_like = objects.where(\"name LIKE (?)\")\n\n    search_by_name = objects.where(\"name IS (?)\")\n    delete_by_module_name = objects.where(\"module = ?\").delete_from()\n\n\nclass Package(Model):\n    table_name = \"packages\"\n    schema = {\n        \"package\": \"TEXT\",\n        \"path\": \"TEXT\",\n    }\n    columns = list(schema.keys())\n    objects = Query(table_name, columns)\n\n    delete_by_package_name = objects.where(\"package = ?\").delete_from()\n"}


