pallets/flask
45 findings in 24 Python files · 9,566 lines · scanned in 16.6 s on 2026-11-12
Every number here comes from the same analyzer that runs on your upload, on the tree as it is in the repository. A finding is listed with the function or module it sits in; nothing is matched from text. Tests, examples and benchmarks are excluded from the scan, so "never referenced inside the project" means exactly that.
import_cycle 1
modules that import each other
src.flask.jsonCircular import between 2 modules: src.flask.json -> src.flask.json.provider
swallowed_error 1
an except that hides what went wrong
src.flask.config.Config.from_prefixed_envexception caught at line(s) 163 and dropped silently — log it or re-raise, or the failure never reaches anyone
god_class 3
a class that owns too much
src.flask.app.Flask35 methods — likely does too muchsrc.flask.sansio.app.App28 methods — likely does too muchsrc.flask.sansio.scaffold.Scaffold26 methods — likely does too much
wide_signature 8
functions that take so many arguments the call sites are unreadable
src.flask.app.Flask.__init__10 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 12 call sites (src/flask/app.py:321, src/flask/blueprints.py:32, src/flask/cli.py:587)src.flask.blueprints.Blueprint.__init__10 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 12 call sites (src/flask/app.py:321, src/flask/blueprints.py:32, src/flask/cli.py:587)src.flask.cli.FlaskGroup.__init__6 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 12 call sites (src/flask/app.py:321, src/flask/blueprints.py:32, src/flask/cli.py:587)src.flask.cli.run_command9 parameters — a call site says nothing about them; group them into one object or split the functionsrc.flask.helpers.send_file8 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 1 call site (src/flask/helpers.py:528)src.flask.sansio.app.App.__init__10 parameters — a call site says nothing about them; group them into one object or split the function - reachable from 12 call sites (src/flask/app.py:321, src/flask/blueprints.py:32, src/flask/cli.py:587)
and 2 more of the same check.
complex 3
branchy functions, counted from the AST
src.flask.app.Flask.make_responsecyclomatic complexity 16src.flask.cli.routes_commandcyclomatic complexity 18src.flask.sansio.blueprints.Blueprint.registercyclomatic complexity 23
duplicate 2
the same block in two places
src.flask.app.Flask.get_send_file_max_ageIdentical code in 2 functions (src.flask.app.Flask.get_send_file_max_age, src.flask.blueprints.Blueprint.get_send_file_max_age) — extract it into one function and call it from eachsrc.flask.app.Flask.send_static_fileIdentical code in 2 functions (src.flask.app.Flask.send_static_file, src.flask.blueprints.Blueprint.send_static_file) — extract it into one function and call it from each
large_module 1
a check from the analyzer
src.flask.app1686 lines
unused 21
never called, never imported, never read
src.flask.app.Flask.open_resourcenever referenced inside the project (dead code or public API)src.flask.app.Flask.open_instance_resourcenever referenced inside the project (dead code or public API)src.flask.blueprints.Blueprint.open_resourcenever referenced inside the project (dead code or public API)src.flask.cli._path_is_ancestornever referenced inside the project (dead code or public API)src.flask.config.Config.from_envvarnever referenced inside the project (dead code or public API)src.flask.config.Config.from_prefixed_envnever referenced inside the project (dead code or public API)
and 15 more of the same check.
bad_name 5
a name that does not say what the thing holds
src.flask.cli._called_with_wrong_argsnames say nothing (f, tb) — rename to what they holdsrc.flask.config.ConfigAttribute.__get__names say nothing (obj, rv) — rename to what they holdsrc.flask.json.dumpnames say nothing (fp, obj) — rename to what they holdsrc.flask.json.provider.JSONProvider.dumpnames say nothing (fp, obj) — rename to what they holdsrc.flask.sessions.SecureCookieSessionInterface.open_sessionnames say nothing (s, val) — rename to what they hold
Five projects free. A .zip or a public GitHub URL.
Other repositories, same treatment
- Textualize/rich 97 findings
- celery/celery 1052 findings
- encode/django-rest-framework 337 findings
- encode/httpx 26 findings
- fastapi/fastapi 163 findings
- pallets/click 85 findings
- psf/requests 47 findings
- pydantic/pydantic 164 findings
- scrapy/scrapy 186 findings