GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — gh-117348: Refactored RawConfigParser._read for simplicity and comprehensibility by jaraco · Pull Request #117372 · python/cpython gh-117348: Refactored RawConfigParser._read for simplicity and comprehensibility #117372New issueHave 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
Merged
jaraco
merged 23 commits into
python:main
from
jaraco:feature/refactor-configparser-read-complexity
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a25ac00
Extract method for _read_inner, reducing complexity and indentation b…
jaraco 1e69aae
Extract method for _raise_all and yield ParseErrors from _read_inner.
jaraco 8c47781
Prefer iterators to splat expansion and literal indexing.
jaraco 7479814
Extract method for _strip_comments. Reduces complexity by 7.
jaraco a2fffee
Model the file lines in a class to encapsulate the comment status and…
jaraco 23468cb
Encapsulate the read state as a dataclass
jaraco 3d1ef0a
Extract _handle_continuation_line and _handle_rest methods. Reduces c…
jaraco 071baeb
Reindent
jaraco 81f4ce2
At least for now, collect errors in the ReadState
jaraco 8942cc1
Check for missing section header separately.
jaraco 1e72168
Extract methods for _handle_header and _handle_option. Reduces comple…
jaraco 0dfd797
Remove unreachable code. Reduces complexity by 4.
jaraco 77ed897
Remove unreachable branch
jaraco 76f42d3
Handle error condition early. Reduces complexity by 1.
jaraco c18a2bb
Add blurb
jaraco 97aa785
Move _raise_all to ParsingError, as its behavior is most closely rela…
jaraco d310cb4
Split _strip* into separate methods.
jaraco f2a355c
Refactor _strip_full to compute the strip just once and use 'not any'…
jaraco 2492614
Replace use of 'sys.maxsize' with direct computation of the stripped …
jaraco 4968591
Extract has_comments as a dynamic property.
jaraco 7d807bb
Implement clean as a cached property.
jaraco 29cb20f
Model comment prefixes in the RawConfigParser within a prefixes names…
jaraco c834c35
Use a regular expression to search for the first match.
jaraco File filterConversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page. Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page. Diff viewDiff viewThere are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2024-03-29-12-07-26.gh-issue-117348.WjCYvK.rst
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
| ||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |