Skip to content

Commit 6d90789

Browse files
committed
Fix issue with relative imports
1 parent 485b723 commit 6d90789

File tree

7 files changed

+22
-8
lines changed

7 files changed

+22
-8
lines changed

.github/workflows/run-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
run: |
3535
pip install mypy
3636
mypy . --ignore-missing-imports --exclude /build/
37+
- name: Install package
38+
run: |
39+
pip install -e .
3740
- name: Test with pytest, ensuring 75% coverage
3841
run: |
3942
pip install pytest pytest-cov

leetcode_study_tool/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22

3-
from .constants.presets import PRESET_MAP
4-
from .creator import ProblemsCreator
3+
from leetcode_study_tool.constants.presets import PRESET_MAP
4+
from leetcode_study_tool.creator import ProblemsCreator
55

66

77
def generate_parser() -> argparse.ArgumentParser:

leetcode_study_tool/constants/__init__.py

Whitespace-only changes.

leetcode_study_tool/creator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
from p_tqdm import p_map
99

10-
from .constants.presets import PRESET_MAP
11-
from .formatters import FORMAT_MAP
12-
from .outputs import SAVE_MAP
13-
from .queries import generate_session, get_data, get_slug
10+
from leetcode_study_tool.constants.presets import PRESET_MAP
11+
from leetcode_study_tool.formatters import FORMAT_MAP
12+
from leetcode_study_tool.outputs import SAVE_MAP
13+
from leetcode_study_tool.queries import generate_session, get_data, get_slug
1414

1515

1616
class ProblemsCreator:

leetcode_study_tool/queries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import requests
88

9-
from .constants.graphql import (
9+
from leetcode_study_tool.constants.graphql import (
1010
BASE_URL,
1111
COMMUNITY_SOLUTIONS,
1212
QUESTION_CONTENT,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "leetcode-study-tool"
7-
version = "1.2.4"
7+
version = "1.2.5"
88
description = "A tool for studying Leetcode with Python"
99
authors = [{name="John Sutor", email="[email protected]" }]
1010
license = {file = "LICENSE.txt"}

tests/test_e2e.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import os
2+
import unittest
3+
4+
5+
class TestE2E(unittest.TestCase):
6+
def setUp(self) -> None:
7+
super().setUp()
8+
9+
def test_call(self):
10+
exit_status = os.system("leetcode-study-tool --help")
11+
assert exit_status == 0

0 commit comments

Comments
 (0)