diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2021-06-09 19:19:56 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2021-06-09 19:21:34 +0200 |
commit | e96bedf7477d392b8821f76ca85038c198c84375 (patch) | |
tree | c56deba384f45da8958d848113b4da9fa73fe3f9 /fbin/__init__.py | |
parent | 7c13b1038482d68c2ab581dad16fa81c0a09034e (diff) |
Fix linting errors
Style, unused imports, unused variables, etc. as reported by flake8.
Configuration for flake8 has been added to setup.cfg.
Diffstat (limited to 'fbin/__init__.py')
-rw-r--r-- | fbin/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fbin/__init__.py b/fbin/__init__.py index 4bc2ef3..f36d74b 100644 --- a/fbin/__init__.py +++ b/fbin/__init__.py @@ -7,14 +7,14 @@ app.config.from_pyfile('fbin.cfg') # Set up some custom converters. These are needed for file URLs to be properly parsed. + class HashConverter(BaseConverter): regex = r'\w+' + class ExtensionConverter(BaseConverter): regex = r'\.\w+' -app.url_map.converters['hash'] = HashConverter -app.url_map.converters['ext'] = ExtensionConverter @app.context_processor def context_processors(): @@ -29,11 +29,15 @@ def context_processors(): 'nav_html': nav_html, } + +app.url_map.converters['hash'] = HashConverter +app.url_map.converters['ext'] = ExtensionConverter + with app.app_context(): from .fbin import app as fbin, db from .api import app as api from .login import login_manager app.register_blueprint(fbin) - app.register_blueprint(api, url_prefix = '/api') + app.register_blueprint(api, url_prefix='/api') login_manager.init_app(app) db.init_app(app) |