Repository navigation
zavod #52: Рукописные уроки 97–104 - #39
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc256a3af8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| " if line.startswith('[') and line.endswith(']'):\n" | ||
| " section = line[1:-1]\n" | ||
| " continue\n" |
There was a problem hiding this comment.
Handle inline comments on TOML table headers
When a valid header has an inline comment, such as [tool.demo] # config, the endswith(']') check does not recognize it and leaves section set to project. A following name = "foreign" is therefore returned as the project name even when [project] has no name, reproducing the exact cross-section error this lesson is intended to prevent.
Useful? React with 👍 / 👎.
| " start = (page - 1) * size\n" | ||
| " return items[start:start + size]\n", |
There was a problem hiding this comment.
Reject page numbers below one before slicing
The prompt states that pages are numbered from one and out-of-range pages return an empty list, but negative pages create negative slice bounds and can return real data; for example, paginate([1, 2, 3, 4, 5], -1, 2) returns [2, 3]. Validate page < 1 before computing the slice so the reference solution satisfies its stated contract.
Useful? React with 👍 / 👎.
Рукописные уроки 97–104
Круг: 1
Критерии
Изменённые файлы
app/handwritten/lessons_cli_http.pytests/test_handwritten_cli_http.py