mirror of https://github.com/python/cpython
gh-122989: Replace duplicate “self.policy.linesep” with “linesep” (#123002)
`linesep` is already defined as `self.policy.linesep`. It appears that previous refactor was not completed.
This commit is contained in:
parent
135dad9bd7
commit
91ff700de2
|
@ -227,7 +227,7 @@ class Generator:
|
|||
folded = self.policy.fold(h, v)
|
||||
if self.policy.verify_generated_headers:
|
||||
linesep = self.policy.linesep
|
||||
if not folded.endswith(self.policy.linesep):
|
||||
if not folded.endswith(linesep):
|
||||
raise HeaderWriteError(
|
||||
f'folded header does not end with {linesep!r}: {folded!r}')
|
||||
if NEWLINE_WITHOUT_FWSP.search(folded.removesuffix(linesep)):
|
||||
|
|
Loading…
Reference in New Issue