[language]
binary = "python"
version = "3.10"
name = "uv python"

[project]
dependencies = []
dev_dependencies = ["pytest"]

[project.tool]
binary = "uv"

[project.tool.commands]
initializers = [["init", "--lib", "--name", "$PROJECT_NAME", "--no-workspace"]]
add_dependency = ["add"]
add_development_dependency = ["add", "--dev"]
run_tests = ["run", "pytest"]

[[project.post.commands]]
command = "uv"
args = ["venv"]

[[project.post.commands]]
command = "uv"
args = ["pip", "install", "-e", "."]

[[project.post.commands]]
command = "uv"
args = ["run", "pytest"]

[code.directories]
source = "src/$PROJECT_NAME"
test = "tests"

[[code.source]]
file = "main.py"
variant = "leet"
contents = '''
from typing import Optional, List

class Solution:
    def double(self, arg: Optional[int]) -> int:
        return 2 * arg

'''

[[code.test]]
file = "test_main.py"
variant = "leet"
contents = '''
from $PROJECT_NAME.main import Solution

def test_it():
    sln = Solution()
    assert 4 == sln.double(2)

'''

[[code.source]]
file = "main.py"
contents = '''
def sum(addend: int, addend_two: int) -> int:
    return addend + addend_two
'''

[[code.test]]
file = "test_main.py"
contents = '''
from $PROJECT_NAME.main import sum

def test_it():
    assert 4 == sum(2, 2)

'''

[[config]]
file = ".vscode/settings.json"
contents = '''
{
    "python.testing.pytestArgs": [
        "tests"
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true
}
'''
