diff --git a/.vscode/Dockerfile b/.vscode/Dockerfile new file mode 100644 index 0000000..b83ced3 --- /dev/null +++ b/.vscode/Dockerfile @@ -0,0 +1,24 @@ +FROM mcr.microsoft.com/vscode/devcontainers/base:bullseye + +WORKDIR /opt + +# hadolint ignore=DL3008 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl && \ + rm -rf /var/lib/apt/lists/* + +SHELL [ "/bin/bash", "-o", "pipefail", "-c" ] +RUN curl -sSf https://rye-up.com/get | RYE_INSTALL_OPTION="--yes" bash && \ + rye config --set-bool behavior.global-python=true && \ + rye config --set-bool behavior.use-uv=true + +ENV RYE_HOME="/opt/rye" +ENV PATH="$RYE_HOME/shims:$PATH" + +COPY ./.python-version ./pyproject.toml ./requirements* ./ +RUN rye pin "$(cat .python-version)" && \ + rye sync + +RUN chown -R vscode $RYE_HOME diff --git a/Fibonacci.py b/Fibonacci.py new file mode 100644 index 0000000..8617013 --- /dev/null +++ b/Fibonacci.py @@ -0,0 +1,7 @@ +def Fib(n) -> int: # noqa: N802, D103, ANN001 + if n == 1: + return 0 + elif n == 2: # noqa: RET505, PLR2004 + return 1 + else: + return Fib(n - 1) + Fib(n - 2)