Skip to content
Myr

move and update flake8 config

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent 8bfc058 · Browse files · 6 files+33 added−35 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+33 added−35 removed

  • tests:+7 added−7 removed
  • other:+26 added−28 removed

6 files+33 added−35 removed

modified:examples/javascript/js_example/__init__.py+1 added-1 removed
1from flask import Flask23app = Flask(__name__)45from js_example import views # noqa: F4015from js_example import views # noqa: E402, F401
modified:tests/test_apps/blueprintapp/__init__.py+2 added-2 removed
1from flask import Flask23app = Flask(__name__)4app.config["DEBUG"] = True5from blueprintapp.apps.admin import admin6from blueprintapp.apps.frontend import frontend5from blueprintapp.apps.admin import admin # noqa: E4026from blueprintapp.apps.frontend import frontend # noqa: E40278app.register_blueprint(admin)9app.register_blueprint(frontend)
modified:tests/test_appctx.py+3 added-3 removed
118 unmodified lines
119 cleanup_stuff.append(exception)120121 @app.route("/")122 def index():123 raise Exception("dummy")123 raise ValueError("dummy")124125 with pytest.raises(Exception, match="dummy"):125 with pytest.raises(ValueError, match="dummy"):126 with app.app_context():127 client.get("/")128129 assert len(cleanup_stuff) == 1130 assert isinstance(cleanup_stuff[0], Exception)130 assert isinstance(cleanup_stuff[0], ValueError)131 assert str(cleanup_stuff[0]) == "dummy"132133134def test_app_ctx_globals_methods(app, app_ctx):
78 unmodified lines
modified:tests/test_basic.py+2 added-2 removed
1470 unmodified lines
1471 with app.test_request_context():1472 rv = flask.url_for("static", filename="index.html", _external=True)1473 assert rv == "http://example.com/static/index.html"1474 # Providing static_host without host_matching=True should error.1475 with pytest.raises(Exception):1475 with pytest.raises(AssertionError):1476 flask.Flask(__name__, static_host="example.com")1477 # Providing host_matching=True with static_folder1478 # but without static_host should error.1479 with pytest.raises(Exception):1479 with pytest.raises(AssertionError):1480 flask.Flask(__name__, host_matching=True)1481 # Providing host_matching=True without static_host1482 # but with static_folder=None should not error.1483 flask.Flask(__name__, host_matching=True, static_folder=None)
475 unmodified lines
added:.flake8+25 added
1[flake8]2extend-select =3 # bugbear4 B5 # bugbear opinions6 B97 # implicit str concat8 ISC9extend-ignore =10 # slice notation whitespace, invalid11 E20312 # line length, handled by bugbear B95013 E50114 # bare except, handled by bugbear B00115 E72216 # zip with strict=, requires python >= 3.1017 B90518 # string formatting opinion, B028 renamed to B90719 B02820 B90721# up to 88 allowed by bugbear B95022max-line-length = 8023per-file-ignores =24 # __init__ exports names25 src/flask/__init__.py: F401
modified:setup.cfg-27 removed
59 unmodified lines
60source =61 src62 */site-packages6364[flake8]65# B = bugbear66# E = pycodestyle errors67# F = flake8 pyflakes68# W = pycodestyle warnings69# B9 = bugbear opinions70# ISC = implicit str concat71select = B, E, F, W, B9, ISC72ignore =73 # slice notation whitespace, invalid74 E20375 # import at top, too many circular import fixes76 E40277 # line length, handled by bugbear B95078 E50179 # bare except, handled by bugbear B00180 E72281 # bin op line break, invalid82 W50383 # requires Python 3.1084 B90585# up to 88 allowed by bugbear B95086max-line-length = 8087per-file-ignores =88 # __init__ exports names89 src/flask/__init__.py: F4019064[mypy]65files = src/flask, tests/typing66python_version = 3.767show_error_codes = True
29 unmodified lines