Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 31, 2025

This PR contains the following updates:

Package Change Age Confidence
typer (changelog) >=0.16.0,<0.17 -> >=0.19.2,<0.20 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

fastapi/typer (typer)

v0.19.2

Compare Source

Fixes
Refactors
Internal

v0.19.1

Compare Source

Note: this is the last version to support Python 3.7, going forward Typer will require Python 3.8+. And soon Python 3.8 will also be dropped as Python 3.8 reached it's end of life almost a year ago.

Fixes

v0.19.0

Compare Source

Features
Refactors
Docs

v0.18.0

Compare Source

Fixes
  • 👽️ Ensure compatibility with Click 8.3.0 by restoring the original value_is_missing function. PR #​1333 by @​svlandeg.
Upgrades
  • 📌 Remove pin for Click < 8.3.0 now that there's a fix for the changes. PR #​1346 by @​tiangolo.

v0.17.5

Compare Source

Fixes
  • ⬇️ Restrict Click to below 8.3.0 to handle changes in the new version. PR #​1336 by @​svlandeg.
Internal

v0.17.4

Compare Source

Fixes
Internal

v0.17.3

Compare Source

Features

v0.17.2

Compare Source

Fixes

v0.17.1

Compare Source

Fixes

v0.17.0

Compare Source

Features
Internal

v0.16.1

Compare Source

Fixes
  • 🐛 Avoid printing additional output with no_args_is_help=True and Click 8.2. PR #​1278 by @​svlandeg.
Docs
Internal

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the automerge Merge the pull request once unit tests and other checks pass. label Aug 31, 2025
liblaf
liblaf previously approved these changes Aug 31, 2025
@liblaf-bot
Copy link
Contributor

liblaf-bot bot commented Aug 31, 2025

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shellcheck 3 0 0 0.26s
✅ BASH shfmt 3 0 0 0 0.01s
⚠️ COPYPASTE jscpd yes 1 no 1.85s
⚠️ JSON jsonlint 10 1 0 0.16s
✅ JSON prettier 10 0 0 0 0.39s
✅ JSON v8r 10 0 0 4.51s
⚠️ PYTHON ruff yes yes 100 no 1.55s
✅ SPELL cspell 49 0 0 3.46s
✅ YAML prettier 4 0 0 0 0.44s
✅ YAML v8r 4 0 0 4.16s
✅ YAML yamllint 4 0 0 0.37s

Detailed Issues

⚠️ COPYPASTE / jscpd - 1 error
Clone found (python):
 - src/thu_learn_downloader/download/downloader.py [162:10 - 173:5] (11 lines, 93 tokens)
   src/thu_learn_downloader/download/downloader.py [117:13 - 128:3]

┌────────┬────────────────┬─────────────┬──────────────┬──────────────┬──────────────────┬───────────────────┐
│ Format │ Files analyzed │ Total lines │ Total tokens │ Clones found │ Duplicated lines │ Duplicated tokens │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ bash   │ 12             │ 281         │ 1834         │ 0            │ 0 (0%)           │ 0 (0%)            │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ python │ 20             │ 1305        │ 10048        │ 1            │ 11 (0.84%)       │ 93 (0.93%)        │
├────────┼────────────────┼─────────────┼──────────────┼──────────────┼──────────────────┼───────────────────┤
│ Total: │ 32             │ 1586        │ 11882        │ 1            │ 11 (0.69%)       │ 93 (0.78%)        │
└────────┴────────────────┴─────────────┴──────────────┴──────────────┴──────────────────┴───────────────────┘
Found 1 clones.
HTML report saved to megalinter-reports/copy-paste/html/
ERROR: jscpd found too many duplicates (0.69%) over threshold (0%)
Error: ERROR: jscpd found too many duplicates (0.69%) over threshold (0%)
    at ThresholdReporter.report (/node-deps/node_modules/@jscpd/finder/dist/index.js:612:13)
    at /node-deps/node_modules/@jscpd/finder/dist/index.js:110:18
    at Array.forEach (<anonymous>)
    at /node-deps/node_modules/@jscpd/finder/dist/index.js:109:22
    at async /node-deps/node_modules/jscpd/dist/jscpd.js:351:5
⚠️ JSON / jsonlint - 1 error
File: .vscode/settings.json
Parse error on line 17, column 5:
....customTags": [    // ref: <https://squ...
----------------------^
Unexpected token "/"
⚠️ PYTHON / ruff - 100 errors
TRY301 Abstract `raise` to an inner function
  --> src/thu_learn_downloader/client/client.py:33:17
   |
31 |             token = self.cookies.get("XSRF-TOKEN")
32 |             if token is None:
33 |                 raise KeyError("XSRF-TOKEN not found in cookies")
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |             return token
35 |         except KeyError as e:
   |

TRY003 Avoid specifying long messages outside the exception class
  --> src/thu_learn_downloader/client/client.py:33:23
   |
31 |             token = self.cookies.get("XSRF-TOKEN")
32 |             if token is None:
33 |                 raise KeyError("XSRF-TOKEN not found in cookies")
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |             return token
35 |         except KeyError as e:
   |

EM101 Exception must not use a string literal, assign to variable first
  --> src/thu_learn_downloader/client/client.py:33:32
   |
31 |             token = self.cookies.get("XSRF-TOKEN")
32 |             if token is None:
33 |                 raise KeyError("XSRF-TOKEN not found in cookies")
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 |             return token
35 |         except KeyError as e:
   |
help: Assign to variable; remove string literal

TRY300 Consider moving this statement to an `else` block
  --> src/thu_learn_downloader/client/client.py:34:13
   |
32 |             if token is None:
33 |                 raise KeyError("XSRF-TOKEN not found in cookies")
34 |             return token
   |             ^^^^^^^^^^^^
35 |         except KeyError as e:
36 |             print(f"无法获取CSRF token: {e}")
   |

TRY002 Create your own exception
  --> src/thu_learn_downloader/client/client.py:38:19
   |
36 |             print(f"无法获取CSRF token: {e}")
37 |             print(f"当前cookies: {list(self.cookies.keys())}")
38 |             raise Exception("登录状态可能已失效,请重新登录") from e
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |

EM101 Exception must not use a string literal, assign to variable first
  --> src/thu_learn_downloader/client/client.py:38:29
   |
36 |             print(f"无法获取CSRF token: {e}")
37 |             print(f"当前cookies: {list(self.cookies.keys())}")
38 |             raise Exception("登录状态可能已失效,请重新登录") from e
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: Assign to variable; remove string literal

RUF001 String contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
  --> src/thu_learn_downloader/client/client.py:38:39
   |
36 |             print(f"无法获取CSRF token: {e}")
37 |             print(f"当前cookies: {list(self.cookies.keys())}")
38 |             raise Exception("登录状态可能已失效,请重新登录") from e
   |                                                ^^
   |

ANN201 Missing return type annotation for public function `get_course_issues`
  --> src/thu_learn_downloader/client/course.py:21:5
   |
21 | def get_course_issues():
   |     ^^^^^^^^^^^^^^^^^
22 |     """获取课程问题汇总"""
23 |     return _course_issues.copy()
   |
help: Add return type annotation

D415 First line should end with a period, question mark, or exclamation point
  --> src/thu_learn_downloader/client/course.py:22:5
   |
21 | def get_course_issues():
22 |     """获取课程问题汇总"""
   |     ^^^^^^^^^^^^^^^^^^^^^^
23 |     return _course_issues.copy()
   |
help: Add closing punctuation

ANN201 Missing return type annotation for public function `clear_course_issues`
  --> src/thu_learn_downloader/client/course.py:26:5
   |
26 | def clear_course_issues():
   |     ^^^^^^^^^^^^^^^^^^^
27 |     """清空课程问题记录"""
28 |     global _course_issues
   |
help: Add return type annotation: `None`

D415 First line should end with a period, question mark, or exclamation point
  --> src/thu_learn_downloader/client/course.py:27:5
   |
26 | def clear_course_issues():
27 |     """清空课程问题记录"""
   |     ^^^^^^^^^^^^^^^^^^^^^^
28 |     global _course_issues
29 |     _course_issues = {
   |
help: Add closing punctuation

PLW0603 Using the global statement to update `_course_issues` is discouraged
  --> src/thu_learn_downloader/client/course.py:28:12
   |
26 | def clear_course_issues():
27 |     """清空课程问题记录"""
28 |     global _course_issues
   |            ^^^^^^^^^^^^^^
29 |     _course_issues = {
30 |         "missing_documents": [],
   |

RUF003 Comment contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
  --> src/thu_learn_downloader/client/course.py:48:15
   |
46 |     @property
47 |     def document_classes(self) -> Sequence[DocumentClass]:
48 |         # 异常处理,记录问题
   |                   ^^
49 |         try:
50 |             response = self.client.get_with_token(
   |

F841 Local variable `json_data` is assigned to but never used
  --> src/thu_learn_downloader/client/course.py:54:13
   |
52 |                 params={"wlkcid": self.id},
53 |             )
54 |             json_data = response.json()["object"]["rows"]
   |             ^^^^^^^^^
55 |
56 |             return [
   |
help: Remove assignment to unused variable `json_data`

BLE001 Do not catch blind exception: `Exception`
  --> src/thu_learn_downloader/client/course.py:61:16
   |
59 |             ]
60 |
61 |         except Exception as e:
   |                ^^^^^^^^^
62 |             _course_issues["missing_document_classes"].append(
63 |                 {"course": self.name, "course_id": self.id, "reason": f"异常: {e!s}"}
   |

TRY300 Consider moving this statement to an `else` block
  --> src/thu_learn_downloader/client/course.py:82:13
   |
80 |             documents.sort(key=lambda document: document.title)
81 |             documents.sort(key=lambda document: document.upload_time)
82 |             return documents
   |             ^^^^^^^^^^^^^^^^
83 |
84 |         except Exception as e:
   |

BLE001 Do not catch blind exception: `Exception`
  --> src/thu_learn_downloader/client/course.py:84:16
   |
82 |             return documents
83 |
84 |         except Exception as e:
   |                ^^^^^^^^^
85 |             _course_issues["missing_documents"].append(
86 |                 {"course": self.name, "course_id": self.id, "reason": f"异常: {e!s}"}
   |

RUF003 Comment contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
   --> src/thu_learn_downloader/client/course.py:113:27
    |
111 |         ]
112 |
113 |         # 如果所有作业API都没有返回数据,记录该课程
    |                                        ^^
114 |         if not all_homeworks:
115 |             _course_issues["missing_homeworks"].append(
    |

RUF003 Comment contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
   --> src/thu_learn_downloader/client/course.py:127:27
    |
125 |             # 检查响应状态
126 |             if resp.status_code != 200:
127 |                 # 作业API失败时,只在所有作业API都失败时才记录
    |                                ^^
128 |                 return []
    |

BLE001 Do not catch blind exception: `Exception`
   --> src/thu_learn_downloader/client/course.py:148:16
    |
146 |             ]
147 |
148 |         except Exception:
    |                ^^^^^^^^^
149 |             return []
    |

TID252 Prefer absolute imports over relative imports from parent modules
  --> src/thu_learn_downloader/client/learn.py:18:9
   |
17 |     def login(self) -> None:
18 |         from ..login.browser import login_with_browser
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20 |         try:
   |
help: Replace relative imports from parent modules with absolute imports

RUF003 Comment contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
  --> src/thu_learn_downloader/client/learn.py:27:23
   |
25 |                 self.client.cookies[name] = value
26 |
27 |             # 验证登录是否成功,尝试访问课程页面
   |                               ^^
28 |             response = self.client.get(
29 |                 url=url.make_url(path="/f/wlxt/index/course/student/")
   |

RUF001 String contains ambiguous `!` (FULLWIDTH EXCLAMATION MARK). Did you mean `!` (EXCLAMATION MARK)?
  --> src/thu_learn_downloader/client/learn.py:32:31
   |
30 |             )
31 |             if response.status_code == 200:
32 |                 print("浏览器登录成功!")
   |                                      ^^
33 |             else:
34 |                 raise Exception("登录验证失败,请重试")
   |

TRY301 Abstract `raise` to an inner function
  --> src/thu_learn_downloader/client/learn.py:34:17
   |
32 |                 print("浏览器登录成功!")
33 |             else:
34 |                 raise Exception("登录验证失败,请重试")
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35 |
36 |         except Exception as e:
   |

TRY002 Create your own exception
  --> src/thu_learn_downloader/client/learn.py:34:23
   |
32 |                 print("浏览器登录成功!")
33 |             else:
34 |                 raise Exception("登录验证失败,请重试")
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35 |
36 |         except Exception as e:
   |

EM101 Exception must not use a string literal, assign to variable first
  --> src/thu_learn_downloader/client/learn.py:34:33
   |
32 |                 print("浏览器登录成功!")
33 |             else:
34 |                 raise Exception("登录验证失败,请重试")
   |                                 ^^^^^^^^^^^^^^^^^^^^^^
35 |
36 |         except Exception as e:
   |
help: Assign to variable; remove string literal

RUF001 String contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
  --> src/thu_learn_downloader/client/learn.py:34:40
   |
32 |                 print("浏览器登录成功!")
33 |             else:
34 |                 raise Exception("登录验证失败,请重试")
   |                                              ^^
35 |
36 |         except Exception as e:
   |

BLE001 Do not catch blind exception: `Exception`
  --> src/thu_learn_downloader/client/learn.py:36:16
   |
34 |                 raise Exception("登录验证失败,请重试")
35 |
36 |         except Exception as e:
   |                ^^^^^^^^^
37 |             print(f"浏览器登录失败: {e}")
   |

RUF003 Comment contains ambiguous `,` (FULLWIDTH COMMA). Did you mean `,` (COMMA)?
  --> src/thu_learn_downloader/client/learn.py:42:22
   |
40 |     #     """
41 |     #     登录方法
42 |     #     如果提供了用户名和密码,使用传统登录方式(保留兼容性)
   |                                 ^^
43 |     #     否则使用浏览器登录方式
44 |     #     """
   |

RUF003 Comment contains ambiguous `(` (FULLWIDTH LEFT PARENTHESIS). Did you mean `(` (LEFT PARENTHESIS)?
  --> src/thu_learn_downloader/client/learn.py:42:31
   |
40 |     #     """
41 |     #     登录方法
42 |     #     如果提供了用户名和密码,使用传统登录方式(保留兼容性)
   |                                                   ^^
43 |     #     否则使用浏览器登录方式
44 |     #     """
   |

RUF003 Comment contains ambiguous `)` (FULLWIDTH RIGHT PARENTHESIS). Did you mean `)` (RIGHT PARENTHESIS)?
  --> src/thu_learn_downloader/client/learn.py:42:37
   |
40 |     #     """
41 |     #     登录方法
42 |     #     如果提供了用户名和密码,使用传统登录方式(保留兼容性)
   |                                                               ^^
43 |     #     否则使用浏览器登录方式
44 |     #     """
   |

RUF003 Comment contains ambiguous `(` (FULLWIDTH LEFT PARENTHESIS). Did you mean `(` (LEFT PARENTHESIS)?
  --> src/thu_learn_downloader/client/learn.py:53:26
   |
52 |     # def _login_with_credentials(self, username: str, password: str) -> None:
53 |     #     """传统的用户名密码登录方式(保留作为备用)"""
   |                                      ^^
54 |     #     response: Response = self.client.get(url=url.make_url())
55 |     #     soup: BeautifulSoup = BeautifulSoup(
   |

RUF003 Comment contains ambiguous `)` (FULLWIDTH RIGHT PARENTHESIS). Did you mean `)` (RIGHT PARENTHESIS)?
  --> src/thu_learn_downloader/client/learn.py:53:33
   |
52 |     # def _login_with_credentials(self, username: str, password: str) -> None:
53 |     #     """传统的用户名密码登录方式(保留作为备用)"""
   |                                                    ^^
54 |     #     response: Response = self.client.get(url=url.make_url())
55 |     #     soup: BeautifulSoup = BeautifulSoup(
   |

ANN001 Missing type annotation for function argument `fragment`
  --> src/thu_learn_downloader/client/url.py:14:5
   |
12 |     path: str = "",
13 |     query: Mapping | None = None,
14 |     fragment="",
   |     ^^^^^^^^
15 | ) -> str:
16 |     query = query or {}
   |

ANN201 Missing return type annotation for public function `cast`
 --> src/thu_learn_downloader/common/typing.py:1:5
  |
1 | def cast(typ, val):
  |     ^^^^
2 |     assert isinstance(val, typ)
3 |     return val
  |
help: Add return type annotation

ANN001 Missing type annotation for function argument `typ`
 --> src/thu_learn_downloader/common/typing.py:1:10
  |
1 | def cast(typ, val):
  |          ^^^
2 |     assert isinstance(val, typ)
3 |     return val
  |

ANN001 Missing type annotation for function argument `val`
 --> src/thu_learn_downloader/common/typing.py:1:15
  |
1 | def cast(typ, val):
  |               ^^^
2 |     assert isinstance(val, typ)
3 |     return val
  |

ARG001 Unused function argument: `semester`
  --> src/thu_learn_downloader/download/description.py:8:5
   |
 7 | def document(
 8 |     semester: Semester,
   |     ^^^^^^^^
 9 |     course: Course,
10 |     document_class: DocumentClass,
   |

ARG001 Unused function argument: `document_class`
  --> src/thu_learn_downloader/download/description.py:10:5
   |
 8 |     semester: Semester,
 9 |     course: Course,

(Truncated to 13333 characters out of 35401)

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

@renovate renovate bot force-pushed the renovate/typer-0.x branch from 30efe5e to 78d339c Compare September 4, 2025 14:45
@renovate renovate bot removed the automerge Merge the pull request once unit tests and other checks pass. label Sep 4, 2025
liblaf
liblaf previously approved these changes Sep 4, 2025
@renovate renovate bot assigned liblaf Sep 4, 2025
@renovate renovate bot requested a review from liblaf September 4, 2025 16:58
@renovate renovate bot changed the title fix(deps): update dependency typer to >=0.17.3,<0.18 fix(deps): update dependency typer to >=0.17.4,<0.18 Sep 5, 2025
@renovate renovate bot force-pushed the renovate/typer-0.x branch from f3808c0 to 58a3745 Compare September 5, 2025 18:42
liblaf
liblaf previously approved these changes Sep 5, 2025
liblaf
liblaf previously approved these changes Sep 5, 2025
Copy link

codecov bot commented Sep 7, 2025

⚠️ File not in storage

No result to display due to the CLI not being able to find the file.
Please ensure the file contains junit in the name and automated file search is enabled,
or the desired file specified by the file and search_dir arguments of the CLI.

liblaf
liblaf previously approved these changes Sep 7, 2025
liblaf
liblaf previously approved these changes Sep 7, 2025
liblaf
liblaf previously approved these changes Sep 14, 2025
@renovate renovate bot changed the title fix(deps): update dependency typer to >=0.17.4,<0.18 fix(deps): update dependency typer to >=0.18,<0.19 Sep 19, 2025
@renovate renovate bot force-pushed the renovate/typer-0.x branch from fe8455e to f5c701d Compare September 19, 2025 21:10
liblaf
liblaf previously approved these changes Sep 19, 2025
@renovate renovate bot changed the title fix(deps): update dependency typer to >=0.18,<0.19 fix(deps): update dependency typer to >=0.19,<0.20 Sep 20, 2025
@renovate renovate bot force-pushed the renovate/typer-0.x branch from f5c701d to f1066ca Compare September 20, 2025 09:02
liblaf
liblaf previously approved these changes Sep 20, 2025
@renovate renovate bot changed the title fix(deps): update dependency typer to >=0.19,<0.20 fix(deps): update dependency typer to >=0.19.1,<0.20 Sep 20, 2025
@renovate renovate bot force-pushed the renovate/typer-0.x branch from f1066ca to 1a2eba6 Compare September 20, 2025 13:28
liblaf
liblaf previously approved these changes Sep 20, 2025
@renovate renovate bot force-pushed the renovate/typer-0.x branch from 1a2eba6 to a89fb23 Compare September 21, 2025 05:08
@renovate renovate bot changed the title fix(deps): update dependency typer to >=0.19.1,<0.20 fix(deps): update dependency typer to >=0.19.2,<0.20 Sep 23, 2025
@renovate renovate bot force-pushed the renovate/typer-0.x branch from a89fb23 to b82e46a Compare September 23, 2025 12:38
@renovate renovate bot force-pushed the renovate/typer-0.x branch from b82e46a to 8c85cec Compare October 5, 2025 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant