SKY-R102 · Quality, structure and performance
Python lint policy
A linter (Ruff, Flake8 or Pylint) flags common mistakes and style problems in Python code. SKY-R102 reports a repository that contains Python code but has no configuration for any of them.
- Languages
- Python
- Quality gate
- counted toward the gate limits (full and diff scans). Advice that is measured on every
--qualityscan but not listed by default. It is listed, and counted towardmax_quality, with--all-adviceor when the rule is named in[tool.skylos.gate] rules. A diff scan checks it only when the change touches a policy file such aspyproject.toml. - Finding type
- advice
Why it matters
Without a shared linter configuration, unused imports, shadowed names and similar slips reach review, and each developer's editor applies different rules, so the same file changes back and forth.
What Skylos flags
[project]name = "shop"version = "1.0.0" [tool.mypy]files = ["app"]"""Price helpers.""" def total(prices: list[float]) -> float: return sum(prices)What Skylos leaves alone
[flake8]max-line-length = 88exclude = .venv,buildWhy Skylos leaves it alone
The linter is configured in a [flake8] section of setup.cfg. Skylos checks the usual places for Ruff, Flake8 and Pylint settings, not only pyproject.toml.
How Skylos decides
- Runs with
--quality, once per scanned project. A diff scan runs it only when a policy file is among the changed files. - Checks that the project has at least one
.py,.pyior.pywfile, leaving out excluded folders and virtual environments. - Looks for a linter policy at the project root:
[tool.ruff],[tool.flake8]or[tool.pylint]inpyproject.toml; aruff.toml,.ruff.toml,.flake8,.pylintrc,pylintrcorpylintrc.tomlfile; or aflake8orpylintsection insetup.cfgortox.ini. - When none exists, reports LOW on line 1 of
pyproject.toml, or on the project folder when there is nopyproject.toml.
How to fix it
Add a linter configuration, for example a [tool.ruff] table, and run the linter in CI or a pre-commit hook.
[project]name = "shop"version = "1.0.0" [tool.mypy]files = ["app"]Added: Added: [tool.ruff]Added: line-length = 88Added: Added: [tool.ruff.lint]Added: select = ["E", "F", "B"]When it can be wrong
- A linter configured only in a CI script or an editor setting is not seen, so the project is reported.
- Other linters, such as Prospector or wemake-python-styleguide on their own, do not count.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
ignore = ["SKY-R102"]under[tool.skylos]turns the check off. An inline marker inpyproject.tomlis not read.