% !TEX root=main.tex
\usepackage[outputdir=build]{minted}
\usepackage{tcolorbox}
\usepackage{etoolbox}
\tcbuselibrary{minted,skins,breakable}

\makeatletter
\renewenvironment{minted@colorbg}[1]{
\setlength{\fboxsep}{\z@}
\def\minted@bgcol{#1}
\noindent
\begin{lrbox}{\minted@bgbox}
\begin{minipage}{\linewidth}}
{\end{minipage}
\end{lrbox}%
\colorbox{\minted@bgcol}{\usebox{\minted@bgbox}}}
\makeatother

\usemintedstyle{friendly}
\newminted[pythoncode]{python}{frame=single, framesep=2pt, numbersep=1mm, linenos, fontsize=\tiny, escapeinside=||, bgcolor=black!10}

\def\theFancyVerbLine{%
	\ttfamily\tiny\arabic{FancyVerbLine}%
	%{\tikz[remember picture,overlay]\node(minted-\arabic{FancyVerbLine}){};}%
}

