Skip to content

Commit

Permalink
Merge pull request #26 from tucked/update
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
tucked authored Jan 10, 2025
2 parents d15dd34 + 6052ec5 commit 4acc219
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 70 deletions.
115 changes: 51 additions & 64 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pbnh/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ def redirect_to_mode(
@blueprint.get("/<string:hashid>./<string:mode>")
def redirect_to_raw(hashid: str, mode: str = "") -> flask.typing.ResponseReturnValue:
paste = _get_paste(hashid)
extension = mimetypes.guess_extension(paste["mime"], strict=False) or abort(
suffix = mimetypes.guess_extension(paste["mime"], strict=False) or abort(
422,
"There is no extension associated with"
f" the paste's media type ({paste['mime']}).",
)
location = f"/{hashid}{extension}"
location = f"/{hashid}{suffix}"
if mode:
location += f"/{mode}"
return redirect(location, 301)
Expand Down
8 changes: 4 additions & 4 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ init_config="$(mktemp)"
echo "[run]\ninclude = pbnh/__init__.py\n" > "$init_config"
pipenv run pytest --cov --cov-config "$init_config" --cov-branch --cov-fail-under 100 --cov-report term-missing -v tests/test_init.py
rm "$init_config"
pipenv run pytest --cov pbnh.cli --cov-branch --cov-fail-under 100 --cov-report term-missing -v tests/test_cli.py
pipenv run pytest --cov pbnh.db --cov-branch --cov-fail-under 100 --cov-report term-missing -v tests/test_db.py
pipenv run pytest --cov pbnh.views --cov-branch --cov-fail-under 100 --cov-report term-missing -v tests/test_views.py
pipenv run pytest --cov pbnh --cov-branch --cov-fail-under 100 --cov-report term-missing
pipenv run pytest --cov-branch --cov-fail-under 100 --cov-report term-missing --cov pbnh.cli -v tests/test_cli.py
pipenv run pytest --cov-branch --cov-fail-under 100 --cov-report term-missing --cov pbnh.db -v tests/test_db.py
pipenv run pytest --cov-branch --cov-fail-under 100 --cov-report term-missing --cov pbnh.views -v tests/test_views.py
pipenv run pytest --cov-branch --cov-fail-under 100 --cov-report term-missing --cov pbnh

0 comments on commit 4acc219

Please sign in to comment.