Skip to content

build(mise): add qlty for per-function complexity - #131

Draft
iloveitaly wants to merge 2 commits into
masterfrom
cursor/add-qlty-dev-3667
Draft

iloveitaly wants to merge 2 commits into
masterfrom
cursor/add-qlty-dev-3667

Conversation

@iloveitaly

@iloveitaly iloveitaly commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Motivation

Per-function cognitive complexity is the signal we want when reviewing whether a function is hard to follow. Qlty reports that score for Python and TypeScript, and it can emit the functions that cross a threshold.

Celery's task_prerun and task_postrun receivers have to keep the framework's parameter list. Built-in smells cannot be ignored per function, so app/celery.py is excluded from analysis.

Description

github:qltysh/qlty is added to .config/mise.dev.toml as latest. The 14-day release-age setting resolved that to 0.644.0 (28 Aug 2026). The lockfile records the GitHub release assets.

.qlty/qlty.toml is the config qlty init generated, plus app/celery.py in exclude_patterns.

Screenshots / Test

Ran qlty metrics --functions and qlty smells against app/ with Qlty 0.644.0. 245 functions. Four are at or above the default cognitive-complexity threshold of 18:

Cognitive Cyclomatic Lines Function
32 29 102 app/helpers/facebook.py::build_meta_user_data
22 12 37 app/setup.py::_public_members_from_module
20 19 41 app/lib/stripe.py::get_stripe_type_from_id
18 12 69 app/setup.py::autoimport_submodules

After excluding app/celery.py, qlty smells app reports 13 findings and none of them are in that file. Passing app/celery.py directly also returns no results.

# qlty-ignore and a [[triage]] rule for qlty:function-parameters do not suppress built-in smells on Qlty 0.644.0.

Links

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 5, 2026 18:47
Install the Qlty CLI from GitHub releases so function-level cognitive
and cyclomatic scores can be collected during development.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Celery's task_prerun and task_postrun receivers have to keep the
framework parameter list, and built-in smells cannot be ignored per
function. Skip app/celery.py entirely.

Co-authored-by: Michael Bianco <mike@mikebian.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants