Skip to content

Instantly share code, notes, and snippets.

@dibrinsofor
dibrinsofor / sample.py
Last active April 25, 2024 14:47
Flagging interested patterns from source code that uses Mypy
import pathlib
import click
import io, os
from enum import Enum
from typing import Optional, Union
import mypy.nodes
from mypy.parse import parse
from mypy.options import Options
from mypy.errors import CompileError, Errors
@dibrinsofor
dibrinsofor / table.ml
Created April 24, 2024 05:10
b2t2 table encoding
(* table *)
type 'a header = (string * 'a) list
type 'a header = string list
class ['a] table (header : 'b header) = object
val mutable header : 'b header = header
val mutable columns : 'a list = []
method columns : 'a list = columns
(* add rows, can't enforce the header *)