This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.pytest.ini_options] | |
addopts = [ | |
"--strict-config", | |
"--strict-markers", | |
"--cov", | |
"--cov-report=term-missing:skip-covered", | |
"--cov-config=pyproject.toml", | |
] | |
xfail_strict = true | |
filterwarnings = [ "error" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import git | |
import requirements | |
def get_version(req): | |
"""Extracts version from requirement or raises an error if not specified.""" | |
if req.specs: | |
return req.specs[0][1] | |
else: | |
raise ValueError(f"Package {req.name} does not specify a version with '=='.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Middleware.""" | |
from __future__ import annotations | |
import logging | |
import pathlib | |
from django.conf import settings | |
from whitenoise.middleware import WhiteNoiseMiddleware # type: ignore[import-untyped] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Wrapper for matplotlib's image comparison test decorator.""" | |
import contextlib | |
import locale as locale_module | |
from collections.abc import Callable, Generator, Iterable | |
from locale import _setlocale as private_setlocale # type: ignore[attr-defined] | |
from typing import overload | |
from unittest import mock | |
import matplotlib as mpl |