-
Notifications
You must be signed in to change notification settings - Fork 10.3k
v2.6.3: 更新禁漫域名服务器地址,优化文档 #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,44 @@ | ||||||||||||||||||||||||||||||
| [build-system] | ||||||||||||||||||||||||||||||
| requires = ["setuptools"] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [project] | ||||||||||||||||||||||||||||||
| name = "jmcomic" | ||||||||||||||||||||||||||||||
| authors = [{name = "hect0x7", email = "93357912+hect0x7@users.noreply.github.com"}] | ||||||||||||||||||||||||||||||
| description = "Python API For JMComic (禁漫天堂)" | ||||||||||||||||||||||||||||||
| readme = "README.md" | ||||||||||||||||||||||||||||||
| requires-python = ">=3.7" | ||||||||||||||||||||||||||||||
| license = {file = "LICENSE"} | ||||||||||||||||||||||||||||||
| keywords=['python', 'jmcomic', '18comic', '禁漫天堂', 'NSFW'] | ||||||||||||||||||||||||||||||
| classifiers=[ | ||||||||||||||||||||||||||||||
| "Development Status :: 4 - Beta", | ||||||||||||||||||||||||||||||
| "License :: OSI Approved :: MIT License", | ||||||||||||||||||||||||||||||
| "Intended Audience :: Developers", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.7", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.8", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.9", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.10", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.11", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.12", | ||||||||||||||||||||||||||||||
| "Programming Language :: Python :: 3.13", | ||||||||||||||||||||||||||||||
|
Comment on lines
+16
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Uploading the package will be rejected by PyPI until that classifier is officially added. Remove or comment it out for now. - "Programming Language :: Python :: 3.13",🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| "Operating System :: MacOS", | ||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect OS classifier – use the canonical “MacOS :: MacOS X”
- "Operating System :: MacOS",
+ "Operating System :: MacOS :: MacOS X",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| "Operating System :: POSIX :: Linux", | ||||||||||||||||||||||||||||||
| "Operating System :: Microsoft :: Windows", | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| dependencies = [ | ||||||||||||||||||||||||||||||
| "commonx>=0.6.38", | ||||||||||||||||||||||||||||||
| "curl-cffi", | ||||||||||||||||||||||||||||||
| "pillow", | ||||||||||||||||||||||||||||||
| "pycryptodome", | ||||||||||||||||||||||||||||||
| "pyyaml", | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
|
Comment on lines
+27
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Pin or bound the remaining dependencies All runtime dependencies except - "curl-cffi",
- "pillow",
- "pycryptodome",
- "pyyaml",
+ "curl-cffi>=0.6",
+ "pillow>=10.0",
+ "pycryptodome>=3.19",
+ "pyyaml>=6.0",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| dynamic = ["version"] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [project.urls] | ||||||||||||||||||||||||||||||
| Homepage = "https://github.com/hect0x7/JMComic-Crawler-Python" | ||||||||||||||||||||||||||||||
| Documentation = "https://jmcomic.readthedocs.io" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [project.scripts] | ||||||||||||||||||||||||||||||
| jmcomic = "jmcomic.cl:main" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tool.setuptools.dynamic] | ||||||||||||||||||||||||||||||
| version = {attr = "jmcomic.__version__"} | ||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,6 +17,7 @@ def test_fetch_album(self): | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| def test_search(self): | ||||||||||||||||||||||||
| page: JmSearchPage = self.client.search_tag('+无修正 +中文 -全彩') | ||||||||||||||||||||||||
| print(f'总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}') | ||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAvoid prints in tests & confirm
- print(f'总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}')
+ # Assert pagination meta instead of printing
+ import math
+ self.assertIsInstance(page.total, int)
+ self.assertGreater(page.total, 0)
+ self.assertIsInstance(page.page_size, int)
+ self.assertGreater(page.page_size, 0)
+ self.assertEqual(page.page_count,
+ math.ceil(page.total / page.page_size))If 🏁 Script executed: #!/bin/bash
set -e
echo "1. Inspecting test file around line 20:"
sed -n '1,50p' tests/test_jmcomic/test_jm_client.py || true
echo
echo "2. Locating the Page class definition:"
rg -n "class Page" || echo "No Page class found"
echo
echo "3. Checking for a page_size method or property:"
rg -n -C2 "def page_size" || echo "No page_size method defined"
rg -n "@property.*page_size" || echo "No @property decorator on page_size"
echo
echo "4. Searching for page_count implementation to see how it uses page_size:"
rg -n "page_count" -C2 || echo "No page_count reference found"Length of output: 7199 🏁 Script executed: #!/bin/bash
set -e
echo "1. Inspect property page_count implementation in jm_entity.py:"
sed -n '580,630p' src/jmcomic/jm_entity.py || true
echo
echo "2. Locate the JmSearchPage class to see how total and page_count are set:"
rg -n "class JmSearchPage" -C5 src/jmcomic/jm_entity.py || trueLength of output: 1861 Avoid prints in tests & assert pagination metadata The • File: tests/test_jmcomic/test_jm_client.py (line 20) - print(f'总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}')
+ import math
+ # Assert pagination metadata
+ self.assertIsInstance(page.total, int)
+ self.assertGreater(page.total, 0)
+ self.assertIsInstance(page.page_size, int)
+ self.assertGreater(page.page_size, 0)
+ self.assertEqual(
+ page.page_count,
+ math.ceil(page.total / page.page_size)
+ )No changes required to the 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| if len(page) >= 1: | ||||||||||||||||||||||||
| for aid, ainfo in page[0:1:1]: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify an explicit minimum
setuptoolsversion and includewheelPEP-517/518 front-ends expect the build backend to be able to build wheels. Without a
wheelrequirement older environments will fail, andsetuptools< 61.0 will ignore most of the PEP 621 metadata used below.📝 Committable suggestion
🤖 Prompt for AI Agents