Skip to content

Commit

Permalink
capitalized constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaaks committed Sep 5, 2023
1 parent 6b73841 commit a3ed798
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cffconvert/cli/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github_api_version_header = {
GITHUB_API_VERSION_HEADER = {
"X-GitHub-Api-Version": "2022-11-28"
}
4 changes: 2 additions & 2 deletions src/cffconvert/cli/rawify_url.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import requests
from cffconvert.cli.constants import github_api_version_header
from cffconvert.cli.constants import GITHUB_API_VERSION_HEADER


def rawify_url(url):
Expand All @@ -13,7 +13,7 @@ def rawify_url(url):
if refvalue is None:
default_branch = None
repos_api = f"https://api.github.com/repos/{ownername}/{reponame}"
headers = github_api_version_header
headers = GITHUB_API_VERSION_HEADER
headers.update({"Accept": "application/vnd.github+json"})
token = os.environ.get("CFFCONVERT_API_TOKEN")
if token is None:
Expand Down
4 changes: 2 additions & 2 deletions src/cffconvert/cli/read_from_url.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import os
import requests
from cffconvert.cli.constants import github_api_version_header
from cffconvert.cli.constants import GITHUB_API_VERSION_HEADER
from cffconvert.cli.rawify_url import rawify_url as rawify


def read_from_url(url):
if not url.startswith("https://"):
raise AssertionError("URL should be an https:// link")
url_raw = rawify(url)
headers = github_api_version_header
headers = GITHUB_API_VERSION_HEADER
headers.update({"Accept": "text/plain"})
token = os.environ.get("CFFCONVERT_API_TOKEN")
if token is None:
Expand Down

0 comments on commit a3ed798

Please sign in to comment.