Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Remove note from API endpoints (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikahl authored Sep 8, 2020
1 parent 4109402 commit 0df0879
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
24 changes: 8 additions & 16 deletions comet_core/api_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@

import logging
import re
from datetime import timedelta, datetime
from datetime import datetime, timedelta

from flask import Blueprint, g, jsonify, request, render_template_string
from flask import Blueprint, g, jsonify, render_template_string, request

from comet_core.api_helper import (
hydrate_open_issues,
get_db,
requires_auth,
assert_valid_token,
get_db,
hydrate_open_issues,
hydrate_with_request_headers,
requires_auth,
)
from comet_core.model import IgnoreFingerprintRecord

Expand All @@ -51,11 +51,7 @@ def action_succeeded(message=None, status_code=200):
response["msg"] = message
return jsonify(response), status_code

template = (
"<h2>{{ message }}</h2> "
"<p>Note: This feature is still early in development, "
"please reach out to Security if you have any feedback.</p>"
)
template = "<h2>{{ message }}</h2>"
return render_template_string(template, message=message), status_code


Expand All @@ -75,12 +71,8 @@ def action_failed(message=None, status_code=500):
response["message"] = message
return jsonify(response), status_code

template = (
"<h2>Something went wrong: {{ message }}</h2> "
"<p>Please complete the action by emailing to Security.</p>"
"<p>Note: This feature is still early in development, "
"please reach out to Security if you have any feedback.</p>"
)
template = "<h2>Something went wrong: {{ message }}</h2><p>Please complete the action by reach out to Security.</p>"

return render_template_string(template, message=message), status_code


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setuptools.setup(
name="comet-core",
version="2.7.0",
version="2.8.0",
url="https://github.com/spotify/comet-core",
author="Spotify Platform Security",
author_email="[email protected]",
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ commands =
pytest --junitxml=test-reports/junit.xml --cov={toxinidir}/comet --cov={toxinidir}/comet_core/ --cov-report=term --cov-report=xml:test-reports/cobertura.xml {toxinidir}/tests/

[testenv:black]
basepython=python3.6
deps = black
basepython = python3.6
deps = -rrequirements-dev.txt
skip_install = true
commands =
black . --diff --check

[testenv:lint]
basepython=python3.6
basepython = python3.6
deps = -rrequirements-dev.txt
commands =
pylint --rcfile={toxinidir}/.pylintrc comet_core

0 comments on commit 0df0879

Please sign in to comment.