pyproject.toml: a comment or `]` inside a pytest list drops entries
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 86/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- testing
Direção de pesquisa
Comece em src/repo/adapters/python.ts, nas funções readPytestSettings e splitList, e depois leia o caso some_function() em tests/repo/python-adapter.test.ts. Adicione cobertura para os três exemplos TOML e para uma lista em várias linhas com vírgula final; faça com que uma entrada incerta defina settings.unreadable. Execute npm test e confirme que os valores da lista são preservados e que o fallback para entradas ilegíveis está coberto.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
readPytestSettings in src/repo/adapters/python.ts reads python_files, testpaths and pythonpath from [tool.pytest.ini_options] with a regex. The regex takes everything up to the first ], and splitList splits it on whitespace and commas. TOML comments and brackets inside strings both break this:
[tool.pytest.ini_options]
python_files = [
"test_*.py", # see [docs]
"check_*.py",
]
Today this returns ["test_*.py", "#", "see", "[docs"], which drops check_*.py. With the comment # unit instead, it returns ["test_*.py", "#", "unit", "check_*.py"]. testpaths = ["tests/[a]", "integration"] returns ["tests/[a"], which drops integration.
Done when:
- Comments outside strings are ignored, and a
]or,inside a quoted string stays part of the value. Splitting the list into quoted strings works better than splitting on whitespace. - Anything the reader can't parse with certainty sets
settings.unreadable, as a non-literal value already does (see thesome_function()case in the test). DiffCI then runs the full suite, which is safe. Never guess. tests/repo/python-adapter.test.tshas cases for the three examples above, plus a multi-line list with a trailing comma.
New to DiffCI? See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.
- Linguagem predominante
- TypeScript
- Estrelas
- 0
- Forks
- 4
- Merge médio
- 18h 41min
- PRs com merge (30d)
- 48
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de DiffCI/core
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomTalvez já em andamento @FredApps assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
Mantenedores costumam responder em até 1 dia
-
Agent tools: changed_files lists only the new path of a renamed fileTalvez já em andamento @FredApps assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
DiffCI/core#243 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
adapter good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
Todas as issues de DiffCI/core
Issues semelhantes
-
agent-ready area: ui-server priority: p3 type: test
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
schlessera/brain-kit#4249 ·
Mantenedores costumam responder em até 1 dia
-
documentation tool triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
can1357/oh-my-pi#19608 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
dependencies tech-debt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
bcgov/nr-waste-plus#1549 ·
Mantenedores costumam responder em até 1 dia
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
blixvip/solana-tx-parse#18 ·