Merge pull request #1722 from PyCQA/filename-cannot-be-none

remove impossible None check
This commit is contained in:
Anthony Sottile 2022-10-27 00:29:09 -04:00 committed by GitHub
commit ebbb57d63c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -326,7 +326,7 @@ class FileProcessor:
def read_lines(self) -> list[str]:
"""Read the lines for this file checker."""
if self.filename is None or self.filename == "-":
if self.filename == "-":
self.filename = self.options.stdin_display_name or "stdin"
lines = self.read_lines_from_stdin()
else: