Skip to content

Commit

Permalink
Rename github_v2 to github, remove old library code
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Jun 24, 2024
1 parent 66ae470 commit 16069bb
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 164 deletions.
147 changes: 0 additions & 147 deletions lazy_github/lib/github.py

This file was deleted.

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_v2.constants import DEVICE_CODE_GRANT_TYPE, LAZY_GITHUB_CLIENT_ID
from lazy_github.lib.github.constants import DEVICE_CODE_GRANT_TYPE, LAZY_GITHUB_CLIENT_ID

# Auth and client globals
_AUTHENTICATION_CACHE_LOCATION = CONFIG_FOLDER / "auth.text"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import httpx

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


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from functools import partial
from typing import Literal

from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github.client import GithubClient
from lazy_github.models.core import Issue, PullRequest, Repository, User

IssueStateFilter = Literal["open"] | Literal["closed"] | Literal["all"]
Expand Down Expand Up @@ -31,7 +31,7 @@ async def _list(client: GithubClient, repo: Repository, state: IssueStateFilter)
import asyncio

from lazy_github.lib.config import Config
from lazy_github.lib.github_v2.auth import token
from lazy_github.lib.github.auth import token

client = GithubClient(Config.load_config(), token())
repo = Repository(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github_v2.issues import list_all_issues
from lazy_github.lib.github.client import GithubClient
from lazy_github.lib.github.issues import list_all_issues
from lazy_github.models.core import PullRequest, Repository


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from functools import partial
from typing import Literal

from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github.client import GithubClient
from lazy_github.models.core import Repository

RepoTypeFilter = Literal["all"] | Literal["owner"] | Literal["member"]
Expand Down
4 changes: 2 additions & 2 deletions lazy_github/ui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import lazy_github.lib.github as g
from lazy_github.lib.config import Config
from lazy_github.lib.github_v2.auth import token
from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github.auth import token
from lazy_github.lib.github.client import GithubClient
from lazy_github.ui.screens.auth import AuthenticationModal
from lazy_github.ui.screens.primary import LazyGithubMainScreen

Expand Down
4 changes: 2 additions & 2 deletions lazy_github/ui/screens/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from textual.widget import Widget
from textual.widgets import Footer

import lazy_github.lib.github_v2.auth as auth
import lazy_github.lib.github.auth as auth
from lazy_github.lib.config import Config
from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github.client import GithubClient
from lazy_github.ui.screens.primary import LazyGithubMainScreen


Expand Down
4 changes: 2 additions & 2 deletions lazy_github/ui/screens/primary.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from textual.widget import Widget
from textual.widgets import Footer, TabbedContent

from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github_v2.issues import list_all_issues
from lazy_github.lib.github.client import GithubClient
from lazy_github.lib.github.issues import list_all_issues
from lazy_github.lib.messages import IssuesAndPullRequestsFetched, PullRequestSelected, RepoSelected
from lazy_github.ui.widgets.actions import ActionsContainer
from lazy_github.ui.widgets.command_log import CommandLogSection
Expand Down
4 changes: 2 additions & 2 deletions lazy_github/ui/widgets/pull_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from textual.coordinate import Coordinate
from textual.widgets import Label, ListView, Markdown, RichLog, Rule, TabPane

import lazy_github.lib.github_v2.pull_requests as pr_api
from lazy_github.lib.github_v2.client import GithubClient
import lazy_github.lib.github.pull_requests as pr_api
from lazy_github.lib.github.client import GithubClient
from lazy_github.lib.messages import IssuesAndPullRequestsFetched, PullRequestSelected
from lazy_github.lib.string_utils import bold, link, pluralize
from lazy_github.models.core import PullRequest
Expand Down
4 changes: 2 additions & 2 deletions lazy_github/ui/widgets/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from textual.app import ComposeResult
from textual.coordinate import Coordinate

import lazy_github.lib.github_v2.repositories as repos_api
import lazy_github.lib.github.repositories as repos_api
from lazy_github.lib.config import Config
from lazy_github.lib.constants import IS_FAVORITED, favorite_string, private_string
from lazy_github.lib.github_v2.client import GithubClient
from lazy_github.lib.github.client import GithubClient
from lazy_github.lib.messages import RepoSelected
from lazy_github.models.core import Repository
from lazy_github.ui.widgets.command_log import log_event
Expand Down

0 comments on commit 16069bb

Please sign in to comment.