From f3f71184ec00efabc449ccb0fcc7ed830e830e30 Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 00:48:59 +0000 Subject: [PATCH 1/7] chore: formatting cleanup --- openproficiency/Topic.py | 12 ++--- openproficiency/TopicList.py | 12 ++--- tests/TopicList_test.py | 90 ++++++++++++++++++------------------ tests/Topic_test.py | 17 +++---- 4 files changed, 62 insertions(+), 69 deletions(-) diff --git a/openproficiency/Topic.py b/openproficiency/Topic.py index 4646eab..85d4772 100644 --- a/openproficiency/Topic.py +++ b/openproficiency/Topic.py @@ -14,7 +14,7 @@ def __init__( # Optional description: str = "", subtopics: List[Union[str, "Topic"]] = [], - pretopics: List[Union[str, "Topic"]] = [] + pretopics: List[Union[str, "Topic"]] = [], ): # Required self.id = id @@ -43,8 +43,7 @@ def add_subtopic(self, subtopic: Union[str, "Topic"]) -> None: self.subtopics.append(subtopic.id) else: - raise ValueError( - "Subtopic must be a string or a dictionary with an 'id' key.") + raise ValueError("Subtopic must be a string or a dictionary with an 'id' key.") def add_subtopics(self, subtopics: List[Union[str, "Topic"]]) -> None: """ @@ -67,8 +66,7 @@ def add_pretopic(self, pretopic: Union[str, "Topic"]) -> None: elif isinstance(pretopic, Topic): self.pretopics.append(pretopic.id) else: - raise ValueError( - "Pretopic must be a string or a dictionary with an 'id' key.") + raise ValueError("Pretopic must be a string or a dictionary with an 'id' key.") def add_pretopics(self, pretopics: List[Union[str, "Topic"]]) -> None: """ @@ -78,13 +76,13 @@ def add_pretopics(self, pretopics: List[Union[str, "Topic"]]) -> None: for pretopic in pretopics: self.add_pretopic(pretopic) - def to_dict(self) -> dict: + def to_dict(self) -> dict[str, Union[str, List[str]]]: """Convert Topic to JSON-serializable dictionary.""" return { "id": self.id, "description": self.description, "subtopics": self.subtopics, - "pretopics": self.pretopics + "pretopics": self.pretopics, } def to_json(self) -> str: diff --git a/openproficiency/TopicList.py b/openproficiency/TopicList.py index f14ff67..1932522 100644 --- a/openproficiency/TopicList.py +++ b/openproficiency/TopicList.py @@ -15,7 +15,7 @@ def __init__( owner: str, name: str, # Optional - description: str = "" + description: str = "", ): # Required self.owner = owner @@ -178,9 +178,7 @@ def _add_pretopics_recursive( # Check if the topic already exists pretopic = topic_list.get_topic(pretopic_object) if pretopic is None: - pretopic = Topic( - id=pretopic_object, description=current_child.description - ) + pretopic = Topic(id=pretopic_object, description=current_child.description) # Handle dictionary with id and optional nested pretopics elif isinstance(pretopic_object, dict) and "id" in pretopic_object: @@ -189,9 +187,7 @@ def _add_pretopics_recursive( if pretopic is None: pretopic = Topic( id=pretopic_object["id"], - description=pretopic_object.get( - "description", current_child.description - ), + description=pretopic_object.get("description", current_child.description), ) # Queue nested pretopics for processing @@ -206,7 +202,7 @@ def _add_pretopics_recursive( def to_dict(self) -> dict: """ - Export the TopicList to a JSON string. + Export the TopicList to a dictionary. """ # Create dictionary diff --git a/tests/TopicList_test.py b/tests/TopicList_test.py index 267b18f..050c2ee 100644 --- a/tests/TopicList_test.py +++ b/tests/TopicList_test.py @@ -17,7 +17,7 @@ def test_init_required_params(self): # Act topic_list = TopicList( owner=owner, - name=name + name=name, ) # Assert @@ -38,7 +38,7 @@ def test_init_optional_params(self): topic_list = TopicList( owner=owner, name=name, - description=description + description=description, ) # Assert @@ -53,7 +53,7 @@ def test_add_topic_string(self): # Arrange topic_list = TopicList( owner="github", - name="git" + name="git", ) topic_id = "git-commit" @@ -70,11 +70,11 @@ def test_add_topic_topic(self): # Arrange topic_list = TopicList( owner="github", - name="git" + name="git", ) topic1 = Topic( id="git-commit", - description="Storing changes to the Git history" + description="Storing changes to the Git history", ) # Act @@ -90,7 +90,7 @@ def test_get_topic(self): # Arrange topic_list = TopicList( owner="github", - name="git" + name="git", ) topic = Topic(id="git-commit") topic_list.topics[topic.id] = topic @@ -106,10 +106,7 @@ def test_get_topic_nonexistent(self): """Test retrieving a topic that does not exist in the list.""" # Arrange - topic_list = TopicList( - owner="github", - name="git" - ) + topic_list = TopicList(owner="github", name="git",) topic = Topic(id="git-commit") topic_list.topics[topic.id] = topic @@ -126,10 +123,7 @@ def test_full_name(self): # Arrange owner = "github" name = "git" - topic_list = TopicList( - owner=owner, - name=name - ) + topic_list = TopicList(owner=owner, name=name,) # Act full_name = topic_list.full_name @@ -203,7 +197,7 @@ def test_load_from_json_subtopics(self): "description": "Parallel versions of work", "pretopic": ["git-commit"] }, - + "actions": { "description": "Storing changes to the Git history", "subtopics": ["git-branch"] @@ -244,12 +238,12 @@ def test_load_from_json_subsubtopics(self): "name": "github", "description": "Features of the GitHub platform", "topics": { - + "repositories": { "description": "Versioning code with Git repositories", "subtopics": [ "commit-history", - { + { "id": "community-files", "description": "Essential files for repository community health", "subtopics": [ @@ -290,7 +284,7 @@ def test_load_from_json_pretopics(self): "name": "github-features", "description": "Features of the GitHub platform", "topics": { - + "actions": { "description": "Storing changes to the Git history", "pretopics": ["yaml"] @@ -336,12 +330,12 @@ def test_load_from_json_prepretopics(self): "name": "github-features", "description": "Features of the GitHub platform", "topics": { - + "repositories": { "description": "Versioning code with Git repositories", "pretopics": [ "git-commit", - { + { "id": "git-merge", "description": "Essential files for repository community health", "pretopics": [ @@ -383,18 +377,22 @@ def test_to_dict_simple(self): name="github-features", description="Features of the GitHub platform", ) - topic_list.add_topic(Topic( - id="actions", - description="Storing changes to the Git history", - subtopics=["automation"], - pretopics=["yaml"] - )) - topic_list.add_topic(Topic( - id="repositories", - description="Versioning code with Git repositories", - subtopics=["git-clone"], - pretopics=["git-push"] - )) + topic_list.add_topic( + Topic( + id="actions", + description="Storing changes to the Git history", + subtopics=["automation"], + pretopics=["yaml"], + ) + ) + topic_list.add_topic( + Topic( + id="repositories", + description="Versioning code with Git repositories", + subtopics=["git-clone"], + pretopics=["git-push"], + ) + ) # Act data = topic_list.to_dict() @@ -425,18 +423,22 @@ def test_to_json_simple(self): name="github-features", description="Features of the GitHub platform", ) - topic_list.add_topic(Topic( - id="actions", - description="Storing changes to the Git history", - subtopics=["automation"], - pretopics=["yaml"] - )) - topic_list.add_topic(Topic( - id="repositories", - description="Versioning code with Git repositories", - subtopics=["git-clone"], - pretopics=["git-push"] - )) + topic_list.add_topic( + Topic( + id="actions", + description="Storing changes to the Git history", + subtopics=["automation"], + pretopics=["yaml"], + ) + ) + topic_list.add_topic( + Topic( + id="repositories", + description="Versioning code with Git repositories", + subtopics=["git-clone"], + pretopics=["git-push"], + ) + ) # Act json_data = topic_list.to_json() diff --git a/tests/Topic_test.py b/tests/Topic_test.py index a073ec1..8cb6109 100644 --- a/tests/Topic_test.py +++ b/tests/Topic_test.py @@ -36,7 +36,7 @@ def test_init_optional_params(self): id=id, description=description, subtopics=subtopics, - pretopics=pretopics + pretopics=pretopics, ) # Assert @@ -66,7 +66,7 @@ def test_add_subtopic_topic(self): topic = Topic(id="git") subtopic = Topic( id="git-commit", - description="Saving changes to the Git history" + description="Saving changes to the Git history", ) # Act @@ -81,10 +81,7 @@ def test_add_subtopics_mixed(self): # Arrange topic = Topic(id="git") subtopic1 = "git-commit" - subtopic2 = Topic( - id="git-branch", - description="Managing branches in Git" - ) + subtopic2 = Topic(id="git-branch", description="Managing branches in Git") subtopics = [subtopic1, subtopic2] # Act @@ -114,7 +111,7 @@ def test_add_pretopic_topic(self): topic = Topic(id="git") pretopic = Topic( id="version-control", - description="Managing changes to code over time" + description="Managing changes to code over time", ) # Act @@ -131,7 +128,7 @@ def test_add_pretopics_mixed(self): pretopic1 = "version-control" pretopic2 = Topic( id="software-development", - description="The process of creating software" + description="The process of creating software", ) pretopics = [pretopic1, pretopic2] @@ -150,7 +147,7 @@ def test_to_dict(self): id="git-merge", description="Combining branches in Git", subtopics=["git-branch", "git-commit"], - pretopics=["cli"] + pretopics=["cli"], ) # Act @@ -171,7 +168,7 @@ def test_to_json(self): id="git-merge", description="Combining branches in Git", subtopics=["git-branch", "git-commit"], - pretopics=["cli"] + pretopics=["cli"], ) # Act From a8d5edf3b89fa028ae2967759f6d78afc751d76b Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 00:49:30 +0000 Subject: [PATCH 2/7] feat: add missing tests for topic --- tests/Topic_test.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/Topic_test.py b/tests/Topic_test.py index 8cb6109..fcff1fe 100644 --- a/tests/Topic_test.py +++ b/tests/Topic_test.py @@ -75,6 +75,24 @@ def test_add_subtopic_topic(self): # Assert assert subtopic.id in topic.subtopics + def test_add_subtopic_invalid_type(self): + """Test that adding a subtopic with invalid type raises ValueError.""" + + # Arrange + topic = Topic(id="git") + + # Act + result = None + try: + topic.add_subtopic(123) + except Exception as e: + result = e + + # Assert + assert isinstance(result, ValueError) + assert "string" in str(result) + assert "dictionary" in str(result) + def test_add_subtopics_mixed(self): """Test adding multiple subtopics as a mix of strings and Topic instances.""" @@ -120,6 +138,24 @@ def test_add_pretopic_topic(self): # Assert assert pretopic.id in topic.pretopics + def test_add_pretopic_invalid_type(self): + """Test that adding a pretopic with invalid type raises ValueError.""" + + # Arrange + topic = Topic(id="git") + + # Act + result = None + try: + topic.add_pretopic(123) + except Exception as e: + result = e + + # Assert + assert isinstance(result, ValueError) + assert "string" in str(result) + assert "dictionary" in str(result) + def test_add_pretopics_mixed(self): """Test adding multiple pretopics as a mix of strings and Topic instances.""" From 9e2bda64184e943120ddb8ba10744ddd71ef2772 Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 00:49:38 +0000 Subject: [PATCH 3/7] feat: add missing tests for topiclist --- tests/TopicList_test.py | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/TopicList_test.py b/tests/TopicList_test.py index 050c2ee..8485e7f 100644 --- a/tests/TopicList_test.py +++ b/tests/TopicList_test.py @@ -460,3 +460,52 @@ def test_to_json_simple(self): assert data["topics"]["repositories"]["description"] == "Versioning code with Git repositories" assert "git-clone" in data["topics"]["repositories"]["subtopics"] assert "git-push" in data["topics"]["repositories"]["pretopics"] + + def test_from_json_invalid_type(self): + """Test that from_json raises TypeError for non-string input.""" + + # Act + result = None + try: + TopicList.from_json({"owner": "test"}) + except Exception as e: + result = e + + # Assert + assert isinstance(result, TypeError) + assert "must be a JSON string" in str(result) + + def test_from_json_invalid_json(self): + """Test that from_json raises exception for invalid JSON string.""" + + # Arrange + invalid_json = "{this is not valid json" + + # Act + result = None + try: + TopicList.from_json(invalid_json) + except Exception as e: + result = e + + # Assert + assert isinstance(result, json.JSONDecodeError) + assert "Expecting" in str(result) + + # Debugging + def test_repr(self): + """Test string representation of TopicList.""" + + # Arrange + topic_list = TopicList(owner="github", name="git") + topic_list.add_topic("git-commit") + topic_list.add_topic("git-push") + + # Act + repr_str = repr(topic_list) + + # Assert + assert "TopicList" in repr_str + assert "github" in repr_str + assert "git" in repr_str + assert "topics_count=2" in repr_str From 81a5807fd2db71ead0d71a3ea2eb995940e38e99 Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 00:53:24 +0000 Subject: [PATCH 4/7] feat: install and configs for pep8 and black --- .devcontainer/devcontainer.json | 4 +++- .github/workflows/unit-tests.yml | 5 +++++ .vscode/settings.json | 21 ++++++++++++++++++--- pyproject.toml | 8 ++++++++ pyrightconfig.json | 3 +++ requirements-dev.txt | 4 ++++ 6 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 pyrightconfig.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 45afab5..b7a9a43 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,9 @@ "extensions": [ "ms-python.python", "ms-python.debugpy", - "esbenp.prettier-vscode" + "esbenp.prettier-vscode", + "ms-python.black-formatter", + "ms-python.autopep8" ], "settings": { "editor.formatOnSave": true, diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4f070c4..610d130 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -26,6 +26,11 @@ jobs: pip install -r requirements.txt pip install -r requirements-dev.txt + - name: Check formatting + run: | + black --check . + autopep8 --diff --exit-code --recursive . + - name: Run tests with pytest run: | pytest diff --git a/.vscode/settings.json b/.vscode/settings.json index b91dfa3..031736e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,15 +1,30 @@ { + // JSON + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "prettier.printWidth": 120 + }, // Python - "python.analysis.typeCheckingMode": "standard", "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, "python.testing.pytestArgs": [ "tests" ], - + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + }, + "black-formatter.args": [ + "--line-length", + "120" + ], + "autopep8.args": [ + "--max-line-length", + "120" + ], // VS Code + "editor.formatOnSave": true, "files.exclude": { "*.pytest_cache": true, - "*.egg-info": true, + "*.egg-info": true } } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8c80190..4f4e42a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,5 +31,13 @@ Documentation = "https://github.com/openproficiency/model" Repository = "https://github.com/openproficiency/python-sdk.git" Issues = "https://github.com/openproficiency/python-sdk/issues" +[tool.black] +line-length = 120 +target-version = ["py310"] + +[tool.autopep8] +max_line_length = 120 +aggressive = 1 + [tool.setuptools] packages = ["openproficiency"] \ No newline at end of file diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 0000000..0102dcd --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,3 @@ +{ + "typeCheckingMode": "strict" +} diff --git a/requirements-dev.txt b/requirements-dev.txt index b19d3b1..1033061 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,10 @@ # Local package -e . +# Formatting +black>=26.1.0 +autopep8>=2.0 + # Testing pytest>=6.0 pytest-cov>=2.0 From f6333d0e9af5503fd5c0e53522c422a26ec7bb35 Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 01:02:15 +0000 Subject: [PATCH 5/7] chore: cleanup typing warnings --- openproficiency/TopicList.py | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/openproficiency/TopicList.py b/openproficiency/TopicList.py index 1932522..1e226d4 100644 --- a/openproficiency/TopicList.py +++ b/openproficiency/TopicList.py @@ -1,8 +1,7 @@ """TopicList module for OpenProficiency library.""" import json -from datetime import datetime -from typing import Optional, Dict, Any, Union +from typing import Dict, Any, Union, List, cast from .Topic import Topic @@ -65,7 +64,7 @@ def from_json(cls, json_data: str) -> "TopicList": # Verify input is json string try: - data = json.loads(json_data) + data = cast(Dict[str, Any], json.loads(json_data)) except TypeError: raise TypeError("Unable to import. 'json_data' must be a JSON string") except Exception as e: @@ -79,7 +78,7 @@ def from_json(cls, json_data: str) -> "TopicList": ) # Add each topic - topics = data.get("topics", {}) + topics = cast(Dict[str, Any], data.get("topics", {})) for topic_id, topic_data in topics.items(): # Find or create Topic @@ -88,20 +87,21 @@ def from_json(cls, json_data: str) -> "TopicList": topic = topic_list.add_topic(Topic(id=topic_id)) if isinstance(topic_data, dict): - topic.description = topic_data.get("description", "") + topic_dict = cast(Dict[str, Any], topic_data) + topic.description = topic_dict.get("description", "") # Add subtopics cls._add_subtopics_recursive( topic_list=topic_list, parent_topic=topic, - subtopics=topic_data.get("subtopics", []), + subtopics=cast(List[Any], topic_dict.get("subtopics", [])), ) # Add pretopics cls._add_pretopics_recursive( topic_list=topic_list, child_topic=topic, - pretopics=topic_data.get("pretopics", []), + pretopics=cast(List[Any], topic_dict.get("pretopics", [])), ) else: @@ -113,13 +113,13 @@ def from_json(cls, json_data: str) -> "TopicList": def _add_subtopics_recursive( topic_list: "TopicList", parent_topic: Topic, - subtopics: list, + subtopics: List[Any], ) -> None: """ Process subtopics and add them to the topic list. Handles nested subtopics at any depth using an iterative approach. """ - stack = [(subtopics, parent_topic)] + stack: List[tuple[List[Any], Topic]] = [(subtopics, parent_topic)] while stack: current_subtopics, current_parent = stack.pop() @@ -136,16 +136,17 @@ def _add_subtopics_recursive( # Handle dictionary with id and optional nested subtopics elif isinstance(subtopic_object, dict) and "id" in subtopic_object: + subtopic_dict = cast(Dict[str, Any], subtopic_object) # Check if the topic already exists - subtopic = topic_list.get_topic(subtopic_object["id"]) + subtopic = topic_list.get_topic(subtopic_dict["id"]) if subtopic is None: subtopic = Topic( - id=subtopic_object["id"], - description=subtopic_object.get("description", ""), + id=subtopic_dict["id"], + description=subtopic_dict.get("description", ""), ) # Queue nested subtopics for processing - nested_subtopics = subtopic_object.get("subtopics", []) + nested_subtopics = cast(List[Any], subtopic_dict.get("subtopics", [])) if nested_subtopics: stack.append((nested_subtopics, subtopic)) @@ -158,14 +159,14 @@ def _add_subtopics_recursive( def _add_pretopics_recursive( topic_list: "TopicList", child_topic: Topic, - pretopics: list, + pretopics: List[Any], ) -> None: """ Process pretopics and add them to the topic list. Handles nested pretopics at any depth using an iterative approach. Pretopics inherit description from child topic if not explicitly set. """ - stack = [(pretopics, child_topic)] + stack: List[tuple[List[Any], Topic]] = [(pretopics, child_topic)] while stack: current_pretopics, current_child = stack.pop() @@ -182,16 +183,17 @@ def _add_pretopics_recursive( # Handle dictionary with id and optional nested pretopics elif isinstance(pretopic_object, dict) and "id" in pretopic_object: + pretopic_dict = cast(Dict[str, Any], pretopic_object) # Check if the topic already exists - pretopic = topic_list.get_topic(pretopic_object["id"]) + pretopic = topic_list.get_topic(pretopic_dict["id"]) if pretopic is None: pretopic = Topic( - id=pretopic_object["id"], - description=pretopic_object.get("description", current_child.description), + id=pretopic_dict["id"], + description=pretopic_dict.get("description", current_child.description), ) # Queue nested pretopics for processing - nested_pretopics = pretopic_object.get("pretopics", []) + nested_pretopics = cast(List[Any], pretopic_dict.get("pretopics", [])) if nested_pretopics: stack.append((nested_pretopics, pretopic)) @@ -200,7 +202,7 @@ def _add_pretopics_recursive( topic_list.add_topic(pretopic) current_child.add_pretopic(pretopic) - def to_dict(self) -> dict: + def to_dict(self) -> Dict[str, Any]: """ Export the TopicList to a dictionary. """ From 39e2b66831e2c8411d3d05e7223ff7abb6dc6305 Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 01:07:52 +0000 Subject: [PATCH 6/7] chore: tweaks to readme for clarity --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index dbd95cf..5ac0861 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ from openproficiency import Topic topic_arithmetic = Topic( id="arithmetic", description="Basic operations for numeric calculations", - subtopics=["addition", "subtraction"] - pretopics=['writing'] + subtopics=["addition", "subtraction"], + pretopics=["numbers"] ) ``` @@ -72,7 +72,7 @@ t_arithmetic = Topic( "addition", "subtraction", "multiplication", - "division + "division" ] ) topic_list.add_topic(t_arithmetic) @@ -86,7 +86,7 @@ t_algebra = Topic( "single-variable-equations", "multiple-variable-equations" ], - pretopics=[ "arithmetic" ] + pretopics=["arithmetic"] ) ``` @@ -95,6 +95,8 @@ t_algebra = Topic( A **Proficiency Score** represents a person's level of proficiency in a specific topic. ```python +from openproficiency import ProficiencyScore, ProficiencyScoreName + proficiency_score = ProficiencyScore( topic_id="addition", score=ProficiencyScoreName.PROFICIENT @@ -106,6 +108,8 @@ proficiency_score = ProficiencyScore( All score are internally numeric from 0.0 to 1.0, even if set using the score name (above). ```python +from openproficiency import ProficiencyScore + proficiency_score = ProficiencyScore( topic_id="arithmetic", score=0.8 # Same as 'ProficiencyScoreName.PROFICIENT' @@ -121,10 +125,10 @@ from openproficiency import TranscriptEntry # Create a transcript entry entry = TranscriptEntry( - user_id="john-doe", + user_id="first.last@my-email.com", topic_id="arithmetic", score=0.9, - issuer="university-of-example" + issuer="example.com" ) # Access the transcript entry information From 6bc433589afc3c2a4f2f188473a7481182123a54 Mon Sep 17 00:00:00 2001 From: "Christopher W. Blake" Date: Mon, 16 Feb 2026 01:12:46 +0000 Subject: [PATCH 7/7] chore: fix formatting --- tests/TopicList_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/TopicList_test.py b/tests/TopicList_test.py index 8485e7f..ffbc573 100644 --- a/tests/TopicList_test.py +++ b/tests/TopicList_test.py @@ -106,7 +106,10 @@ def test_get_topic_nonexistent(self): """Test retrieving a topic that does not exist in the list.""" # Arrange - topic_list = TopicList(owner="github", name="git",) + topic_list = TopicList( + owner="github", + name="git", + ) topic = Topic(id="git-commit") topic_list.topics[topic.id] = topic @@ -123,7 +126,10 @@ def test_full_name(self): # Arrange owner = "github" name = "git" - topic_list = TopicList(owner=owner, name=name,) + topic_list = TopicList( + owner=owner, + name=name, + ) # Act full_name = topic_list.full_name