Kiro writes unlinted Python code
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
win32
Kiro Version
0.10.78
Bug Description
My organization uses pipelines which perform linting checks on all code modules before deployment. Code produced by Kiro is littered with linting errors that require correction.
Since Kiro requires quite a bit of credits per file to resolve the linting errors that it introduced initially, this represents a credits waste for me.
Steps to Reproduce
Use Kiro to write Python files. Run flake8 against those Python files. The flake8 app will identify introduced errors, warnings, and info responses that should not be caused.
Expected Behavior
Kiro should produce Python code that passes all flake8 tests, perhaps while applying a .flake8 file that overrides the max line length to the current industry standard.
Conversation ID
3f4b303e-6f84-4891-ae92-df36bcf1f00b 3f4b303e-6f84-4891-ae92-df36bcf1f00b 3f4b303e-6f84-4891-ae92-df36bcf1f00b 3f4b303e-6f84-4891-ae92-df36bcf1f00b 3f4b303e-6f84-4891-ae92-df36bcf1f00b
Additional Context
No response
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #4677: AI assistant adds indented empty lines in YAML/code files violating formatting standards (85% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both issues report code formatting/linting problems where Kiro generates code that violates formatting standards - one for YAML indentation issues, the other for Python flake8 compliance
This is not a duplicate. Issue 4677 is about .yaml files. This is about .py files. Linting rules are different for Python and YAML.
Thank you for your feedback! 🙏
The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
Hi @webbd-jabil — thanks for reporting this. Kiro has had significant updates since version 0.10.78, and we're now on 1.0.0. Code quality and steering improvements have been a focus.
Could you check if the unlinted Python code issue still occurs on the latest version? Note that using steering files (.kiro/steering/) to specify linting standards is now the recommended approach.
If we don't hear back within 7 days, we'll close this as resolved. Thanks! 🙏
I asked Kiro to verify or refute the assertion that Kiro now writes linted Python code. Kiro's response is below:
I tested directly: I created a Python file with two problems any linter flags — an unused import os and a reference to an undefined name (undefined_name_xyz) — and asked the IDE for diagnostics twice. Both times it returned zero diagnostics. A clean Python file also returned zero. So Kiro is not surfacing Python lint/type diagnostics here; if it were, that broken file would have shown at least an undefined-name and unused-import warning.
The caveat (to be precise rather than overstate): the diagnostics interface did respond rather than report "no provider available," and a freshly created file that isn't open in the editor may not be analyzed by a language server. So the strict claim I can stand behind is: no Python diagnostics are being produced for these files — including a deliberately broken one. There's no evidence of active Python linting.
Worth clarifying where the linting in this session came from: every "lint clean" check I did was me running flake8 manually in the terminal (python -m flake8 --max-line-length=99 ...), not Kiro linting on its own. That's an explicit command I invoke, separate from any in-editor/IDE linting.
So: whoever's asking — Kiro is not auto-linting the Python here; the flake8 results you've seen are from explicit terminal runs.
Closing this issue as it was reported against an older version of Kiro (v0.x or early v1.x) and has had no activity in several months.
Kiro has shipped significant improvements since these versions, including stability fixes, new features, and major changes across v1.0, v1.1, v2.x, and the current v2.23.x releases. The behavior described here may already be resolved.
If this is still affecting you on the latest version, please open a new issue at https://github.com/kirodotdev/Kiro/issues/new with your current version (kiro-cli --version or Help > About in the IDE), your OS, and steps to reproduce. The latest version is available at https://kiro.dev/downloads/ or via kiro-cli update.
Thank you for taking the time to report this.