Skip to content

Commit

Permalink
remove __version__ (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Apr 30, 2024
2 parents 1d990e7 + a0ccd43 commit a2a2b13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "Flask-DebugToolbar"
version = "0.15.1"
version = "0.16.0.dev"
description = "A toolbar overlay for debugging Flask applications."
readme = "README.md"
license = { file = "LICENSE.txt" }
Expand Down
12 changes: 5 additions & 7 deletions src/flask_debugtoolbar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from __future__ import annotations

import collections.abc as c
import importlib.metadata
import os
import typing as t
import urllib.parse
import warnings
from contextvars import ContextVar

import jinja2.ext
from flask import Blueprint
from flask import current_app
from flask import Flask
Expand All @@ -27,9 +27,6 @@
from .utils import gzip_compress
from .utils import gzip_decompress

__version__ = importlib.metadata.version("flask-debugtoolbar")
_jinja_version = importlib.metadata.version("jinja2")

module: Blueprint = Blueprint("debugtoolbar", __name__)


Expand Down Expand Up @@ -67,10 +64,11 @@ def __init__(self, app: Flask | None = None) -> None:
self.debug_toolbars_var: ContextVar[dict[Request, DebugToolbar]] = ContextVar(
"debug_toolbars"
)
jinja_extensions = ["jinja2.ext.i18n"]
jinja_extensions = [jinja2.ext.i18n]

if _jinja_version[0] == "2":
jinja_extensions.append("jinja2.ext.with_")
# Jinja2<3
if hasattr(jinja2.ext, "with_"):
jinja_extensions.append(jinja2.ext.with_) # pyright: ignore

# Configure jinja for the internal templates and add url rules
# for static data
Expand Down

0 comments on commit a2a2b13

Please sign in to comment.