mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-03 03:56:52 +00:00
Handle empty stdin-display-name values
Apparently, some folks pass an empty string to --stdin-display-name. To avoid the errors this causes, we need to handle it appropriately. Closes #235
This commit is contained in:
parent
185a073c29
commit
352a7250b7
2 changed files with 13 additions and 1 deletions
|
|
@ -288,7 +288,7 @@ class FileProcessor(object):
|
|||
# type: () -> List[str]
|
||||
"""Read the lines for this file checker."""
|
||||
if self.filename is None or self.filename == '-':
|
||||
self.filename = self.options.stdin_display_name
|
||||
self.filename = self.options.stdin_display_name or 'stdin'
|
||||
lines = self.read_lines_from_stdin()
|
||||
else:
|
||||
lines = self.read_lines_from_filename()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue