Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1100592

Browse files
author
cclauss
authored
Set packet_ends = None before using in dviread.py
__packed_ends__ is used on lines 649 and 653 but it is not defined/set until line 666. This drives linters nuts because it is safer to set variables before using them.
1 parent 86514a2 commit 1100592

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/dviread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def _read(self):
640640
Read one page from the file. Return True if successful,
641641
False if there were no more pages.
642642
"""
643-
packet_len, packet_char, packet_width = None, None, None
643+
packet_char, packet_ends, packet_len, packet_width = None, None, None, None
644644
while True:
645645
byte = ord(self.file.read(1)[0])
646646
# If we are in a packet, execute the dvi instructions

0 commit comments

Comments
 (0)