Repository navigation
build(mise): add qlty for per-function complexity - #131
Draft
iloveitaly wants to merge 2 commits into
Draft
iloveitaly wants to merge 2 commits into
iloveitaly wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_prerunandtask_postrunreceivers have to keep the framework's parameter list. Built-in smells cannot be ignored per function, soapp/celery.pyis excluded from analysis.Description
github:qltysh/qltyis added to.config/mise.dev.tomlaslatest. The 14-day release-age setting resolved that to 0.644.0 (28 Aug 2026). The lockfile records the GitHub release assets..qlty/qlty.tomlis the configqlty initgenerated, plusapp/celery.pyinexclude_patterns.Screenshots / Test
Ran
qlty metrics --functionsandqlty smellsagainstapp/with Qlty 0.644.0. 245 functions. Four are at or above the default cognitive-complexity threshold of 18:app/helpers/facebook.py::build_meta_user_dataapp/setup.py::_public_members_from_moduleapp/lib/stripe.py::get_stripe_type_from_idapp/setup.py::autoimport_submodulesAfter excluding
app/celery.py,qlty smells appreports 13 findings and none of them are in that file. Passingapp/celery.pydirectly also returns no results.# qlty-ignoreand a[[triage]]rule forqlty:function-parametersdo not suppress built-in smells on Qlty 0.644.0.Links