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:
Damien 2024-09-04 14:30:25 +08:00 committed by GitHub
parent 135dad9bd7
commit 91ff700de2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)):