Repository Analysis

pallets/flask

The Python micro framework for building web applications.

17.0 Moderate AI signal View on GitHub
17.0
Adjusted Score
17.0
Raw Score
100%
Time Factor
2026-05-18
Last Push
71,581
Stars
Python
Language
19,952
Lines of Code
139
Files
329
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 5MEDIUM 4LOW 320

Pattern Findings

329 matches across 8 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers210 hits · 200 pts
SeverityFileLineSnippet
LOWtests/test_basic.py1396def test_build_error_handler_reraise(app):
LOWtests/test_basic.py1398 def handler_raises_build_error(error, endpoint, values):
LOWtests/test_basic.py1407def test_url_for_passes_special_values_to_build_error_handler(app):
LOWtests/test_basic.py1454def test_static_url_empty_path(app):
LOWtests/test_basic.py1461def test_static_url_empty_path_default(app):
LOWtests/test_basic.py1468def test_static_folder_with_pathlib_path(app):
LOWtests/test_basic.py1477def test_static_folder_with_ending_slash():
LOWtests/test_basic.py42def test_options_on_multiple_rules(app, client):
LOWtests/test_basic.py67def test_method_route_no_methods(app):
LOWtests/test_basic.py72def test_provide_automatic_options_attr_disable(
LOWtests/test_basic.py86def test_provide_automatic_options_attr_enable(
LOWtests/test_basic.py103def test_provide_automatic_options_arg_disable(
LOWtests/test_basic.py116def test_provide_automatic_options_method_disable(
LOWtests/test_basic.py152def test_disallow_string_for_allowed_methods(app):
LOWtests/test_basic.py288def test_session_using_application_root(app, client):
LOWtests/test_basic.py310def test_session_using_session_settings(app, client):
LOWtests/test_basic.py353def test_session_using_samesite_attribute(app, client):
LOWtests/test_basic.py393def test_session_secret_key_fallbacks(app, client) -> None:
LOWtests/test_basic.py467def test_session_special_types(app, client):
LOWtests/test_basic.py498def test_session_cookie_setting(app):
LOWtests/test_basic.py600def test_session_refresh_vary(app, client):
LOWtests/test_basic.py732def test_request_preprocessing_early_return(app, client):
LOWtests/test_basic.py759def test_after_request_processing(app, client):
LOWtests/test_basic.py774def test_teardown_request_handler(app, client):
LOWtests/test_basic.py792def test_teardown_request_handler_debug_mode(app, client):
LOWtests/test_basic.py810def test_teardown_request_handler_error(app, client):
LOWtests/test_basic.py848def test_before_after_request_order(app, client):
LOWtests/test_basic.py924def test_error_handling_processing(app, client):
LOWtests/test_basic.py945def test_baseexception_error_handling(app, client):
LOWtests/test_basic.py956def test_before_request_and_routing_errors(app, client):
LOWtests/test_basic.py986def test_http_error_subclass_handling(app, client):
LOWtests/test_basic.py991 def handle_forbidden_subclass(e):
LOWtests/test_basic.py1018def test_errorhandler_precedence(app, client):
LOWtests/test_basic.py1055def test_trap_bad_request_key_error(app, client, debug, trap, expect_key, expect_abort):
LOWtests/test_basic.py1086def test_trapping_of_all_http_exceptions(app, client):
LOWtests/test_basic.py1097def test_error_handler_after_processor_error(app, client):
LOWtests/test_basic.py1126def test_enctype_debug_helper(app, client):
LOWtests/test_basic.py1235def test_response_type_errors():
LOWtests/test_basic.py1306def test_make_response_with_response_instance(app, req_ctx):
LOWtests/test_basic.py1328def test_jsonify_no_prettyprint(app, compact):
LOWtests/test_basic.py1352def test_jsonify_args_and_kwargs_check(app, req_ctx):
LOWtests/test_basic.py1443def test_static_url_path_with_ending_slash():
LOWtests/test_basic.py1488def test_static_route_with_host_matching():
LOWtests/test_basic.py1526def test_server_name_matching(
LOWtests/test_basic.py1562def test_server_name_subdomain():
LOWtests/test_basic.py1608def test_exception_propagation(app, client, key):
LOWtests/test_basic.py1628def test_werkzeug_passthrough_errors(
LOWtests/test_basic.py1671def test_inject_blueprint_url_defaults(app):
LOWtests/test_basic.py1704def test_no_setup_after_first_request(app, client):
LOWtests/test_basic.py1719def test_routing_redirect_debugging(monkeypatch, app, client):
LOWtests/test_basic.py1739def test_route_decorator_custom_endpoint(app, client):
LOWtests/test_basic.py1772def test_g_iteration_protocol(app_ctx):
LOWtests/test_basic.py1780def test_subdomain_basic_support():
LOWtests/test_basic.py1813def test_subdomain_matching_with_ports():
LOWtests/test_basic.py1827def test_subdomain_matching_other_name(matching):
LOWtests/test_basic.py1862def test_multi_route_class_views(app, client):
LOWtests/test_basic.py1958def test_app_freed_on_zero_refcount():
LOWtests/test_signals.py25def test_before_render_template():
LOWtests/test_signals.py95def test_request_exception_signal():
LOWtests/test_signals.py163def test_appcontext_tearing_down_signal(app, client):
150 more matches not shown…
Unused Imports74 hits · 64 pts
SeverityFileLineSnippet
LOWtests/test_request.py1
LOWtests/test_reqctx.py1
LOWtests/test_cli.py524
LOWtests/test_apps/helloworld/wsgi.py1
LOWtests/type_check/typing_route.py1
LOWtests/type_check/typing_app_decorators.py1
LOWtests/type_check/typing_error_handler.py1
LOWexamples/javascript/js_example/__init__.py5
LOWsrc/flask/logging.py1
LOWsrc/flask/signals.py1
LOWsrc/flask/sessions.py1
LOWsrc/flask/config.py1
LOWsrc/flask/templating.py1
LOWsrc/flask/globals.py1
LOWsrc/flask/__init__.py1
LOWsrc/flask/__init__.py2
LOWsrc/flask/__init__.py3
LOWsrc/flask/__init__.py4
LOWsrc/flask/__init__.py5
LOWsrc/flask/__init__.py6
LOWsrc/flask/__init__.py7
LOWsrc/flask/__init__.py8
LOWsrc/flask/__init__.py9
LOWsrc/flask/__init__.py10
LOWsrc/flask/__init__.py11
LOWsrc/flask/__init__.py12
LOWsrc/flask/__init__.py13
LOWsrc/flask/__init__.py14
LOWsrc/flask/__init__.py15
LOWsrc/flask/__init__.py16
LOWsrc/flask/__init__.py17
LOWsrc/flask/__init__.py18
LOWsrc/flask/__init__.py19
LOWsrc/flask/__init__.py20
LOWsrc/flask/__init__.py21
LOWsrc/flask/__init__.py22
LOWsrc/flask/__init__.py23
LOWsrc/flask/__init__.py24
LOWsrc/flask/__init__.py25
LOWsrc/flask/__init__.py26
LOWsrc/flask/__init__.py27
LOWsrc/flask/__init__.py28
LOWsrc/flask/__init__.py29
LOWsrc/flask/__init__.py30
LOWsrc/flask/__init__.py31
LOWsrc/flask/__init__.py32
LOWsrc/flask/__init__.py33
LOWsrc/flask/__init__.py34
LOWsrc/flask/__init__.py35
LOWsrc/flask/__init__.py36
LOWsrc/flask/__init__.py37
LOWsrc/flask/__init__.py38
LOWsrc/flask/__init__.py39
LOWsrc/flask/blueprints.py1
LOWsrc/flask/blueprints.py11
LOWsrc/flask/cli.py1
LOWsrc/flask/cli.py810
LOWsrc/flask/wrappers.py1
LOWsrc/flask/app.py1
LOWsrc/flask/debughelpers.py1
14 more matches not shown…
Cross-Language Confusion5 hits · 32 pts
SeverityFileLineSnippet
HIGHtests/test_reqctx.py23 ctx.push()
HIGHtests/test_reqctx.py126 ctx.push()
HIGHtests/test_reqctx.py140 ctx.push()
HIGHsrc/flask/app.py1596 ctx.push()
HIGHsrc/flask/ctx.py507 self.push()
Over-Commented Block17 hits · 17 pts
SeverityFileLineSnippet
LOWexamples/celery/requirements.txt1#
LOWexamples/celery/requirements.txt21 # click-plugins
LOWexamples/celery/requirements.txt41 # werkzeug
LOWsrc/flask/views.py61 #: decorator.
LOWsrc/flask/sansio/app.py161 #: Defaults to :class:`werkzeug.exceptions.Aborter`.
LOWsrc/flask/sansio/app.py181 #: Renamed from ``request_globals_class`.
LOWsrc/flask/sansio/app.py201 #: default it's implicitly enabled.
LOWsrc/flask/sansio/app.py241 #: the environment is created (accessing :attr:`jinja_env`) will
LOWsrc/flask/sansio/app.py341
LOWsrc/flask/sansio/app.py361
LOWsrc/flask/sansio/app.py381 #: case of a "Flask-Foo" extension in `flask_foo`, the key would be
LOWsrc/flask/sansio/scaffold.py101
LOWsrc/flask/sansio/scaffold.py121 #: This data structure is internal. It should not be modified
LOWsrc/flask/sansio/scaffold.py141
LOWsrc/flask/sansio/scaffold.py161 #:
LOWsrc/flask/sansio/scaffold.py181 #: directly and its format may change at any time.
LOWsrc/flask/sansio/scaffold.py201
Excessive Try-Catch Wrapping12 hits · 13 pts
SeverityFileLineSnippet
LOWtests/test_basic.py823 except Exception:
LOWtests/test_basic.py835 except Exception:
LOWtests/test_reqctx.py38 except Exception:
LOWtests/test_reqctx.py57 except Exception:
LOWtests/test_appctx.py68 except Exception:
LOWtests/test_appctx.py87 except Exception:
LOWsrc/flask/config.py163 except Exception:
LOWsrc/flask/cli.py650 except Exception:
LOWsrc/flask/cli.py956 except Exception as e:
LOWsrc/flask/app.py1017 except Exception as e:
LOWsrc/flask/app.py1045 except Exception:
LOWsrc/flask/app.py1598 except Exception as e:
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippet
LOWsrc/flask/cli.py41
LOWsrc/flask/cli.py333
LOWsrc/flask/app.py1224
LOWsrc/flask/app.py1366
LOWsrc/flask/app.py1420
LOWsrc/flask/sansio/blueprints.py273
LOWsrc/flask/sansio/app.py868
Self-Referential Comments2 hits · 2 pts
SeverityFileLineSnippet
MEDIUMsrc/flask/app.py868 """This method is called whenever an exception occurs that
MEDIUMsrc/flask/app.py1054 """This method is called to create the default ``OPTIONS`` response.
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippet
MEDIUMsrc/flask/sessions.py101 """The basic interface you have to implement in order to replace the
MEDIUMsrc/flask/app.py1395 """Can be overridden in order to modify the response object