-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use single method for both RSS feeds (#5)
* use single method for both rss feeds Signed-off-by: Bradley Reynolds <[email protected]> * deps: add ruff Signed-off-by: Bradley Reynolds <[email protected]> --------- Signed-off-by: Bradley Reynolds <[email protected]>
- Loading branch information
1 parent
06e90b9
commit d70a5ca
Showing
4 changed files
with
23 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "letsbuilda-pypi" | ||
version = "1.0.0" | ||
version = "2.0.0" | ||
description = "A wrapper for PyPI's API and RSS feed" | ||
authors = [ | ||
{ name = "Bradley Reynolds", email = "[email protected]" }, | ||
|
@@ -21,7 +21,7 @@ documentation = "https://docs.letsbuilda.dev/letsbuilda-pypi/" | |
dev = [ | ||
"black", | ||
"isort", | ||
"pylint", | ||
"ruff", | ||
] | ||
tests = [ | ||
"pytest", | ||
|
@@ -42,15 +42,15 @@ build-backend = "setuptools.build_meta" | |
copyright = "Let's build a ..." | ||
author = "Bradley Reynolds" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.black] | ||
target-version = ["py310"] | ||
line-length = 120 | ||
|
||
[tool.isort] | ||
profile = "black" | ||
[tool.ruff] | ||
line-length = 120 | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "tests -r a -v --doctest-modules src" | ||
|
||
[tool.pylint.format] | ||
max-line-length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
from datetime import datetime | ||
|
||
from letsbuilda.pypi import NewPackageMetadata | ||
from letsbuilda.pypi import PackageMetadata | ||
|
||
|
||
def test_parse_publication_date() -> None: | ||
|
@@ -15,7 +15,7 @@ def test_parse_publication_date() -> None: | |
"author": "[email protected]", | ||
"pubDate": "Wed, 29 Mar 2023 21:30:05 GMT", | ||
} | ||
parsed_data = NewPackageMetadata.build_from(data) | ||
parsed_data = PackageMetadata.build_from(data) | ||
assert parsed_data.publication_date == datetime(2023, 3, 29, 21, 30, 5) | ||
|
||
|
||
|
@@ -28,7 +28,7 @@ def test_author_missing() -> None: | |
"description": "a test package", | ||
"pubDate": "Wed, 29 Mar 2023 21:30:05 GMT", | ||
} | ||
parsed_data = NewPackageMetadata.build_from(data) | ||
parsed_data = PackageMetadata.build_from(data) | ||
assert parsed_data.author is None | ||
|
||
|
||
|
@@ -41,5 +41,5 @@ def test_description_missing() -> None: | |
"author": "[email protected]", | ||
"pubDate": "Wed, 29 Mar 2023 21:30:05 GMT", | ||
} | ||
parsed_data = NewPackageMetadata.build_from(data) | ||
parsed_data = PackageMetadata.build_from(data) | ||
assert parsed_data.description is None |