Skip to content

Commit

Permalink
Combine constants files
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Aug 22, 2024
1 parent 3a5523a commit 1469d76
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
8 changes: 8 additions & 0 deletions lazy_github/lib/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
from pathlib import Path

# Content types
DIFF_CONTENT_ACCEPT_TYPE = "application/vnd.github.diff"
JSON_CONTENT_ACCEPT_TYPE = "application/vnd.github+json"

# App access information
LAZY_GITHUB_CLIENT_ID = "Iv23limdG8Bl3Cu5FOcT"
DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code"

# Symbols used in various UI tables
IS_FAVORITED = "[green]★[/green]"
IS_NOT_FAVORITED = "☆"
Expand Down
2 changes: 1 addition & 1 deletion lazy_github/lib/github/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import httpx

from lazy_github.lib.constants import CONFIG_FOLDER
from lazy_github.lib.github.constants import DEVICE_CODE_GRANT_TYPE, LAZY_GITHUB_CLIENT_ID
from lazy_github.lib.constants import DEVICE_CODE_GRANT_TYPE, LAZY_GITHUB_CLIENT_ID

# Auth and client globals
_AUTHENTICATION_CACHE_LOCATION = CONFIG_FOLDER / "auth.text"
Expand Down
2 changes: 1 addition & 1 deletion lazy_github/lib/github/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import hishel

from lazy_github.lib.config import Config
from lazy_github.lib.github.constants import JSON_CONTENT_ACCEPT_TYPE
from lazy_github.lib.constants import JSON_CONTENT_ACCEPT_TYPE
from lazy_github.models.github import User


Expand Down
7 changes: 0 additions & 7 deletions lazy_github/lib/github/constants.py

This file was deleted.

2 changes: 1 addition & 1 deletion lazy_github/lib/github/pull_requests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lazy_github.lib.github.client import GithubClient
from lazy_github.lib.github.constants import DIFF_CONTENT_ACCEPT_TYPE
from lazy_github.lib.constants import DIFF_CONTENT_ACCEPT_TYPE
from lazy_github.lib.github.issues import list_all_issues
from lazy_github.models.github import (
FullPullRequest,
Expand Down

0 comments on commit 1469d76

Please sign in to comment.