rmuir commented on code in PR #14326: URL: https://github.com/apache/lucene/pull/14326#discussion_r1984173422
########## dev-tools/scripts/create_line_file_docs.py: ########## @@ -60,7 +60,7 @@ def compress_with_seek_points(file_name_in, file_name_out, num_seek_points): break bytes_in_chunk += len(line) - f_out.write(line) # false positive in python's crazy typing # pyright: ignore[reportArgumentType] + f_out.write(line) Review Comment: In this example I'm pretty sure that because `file_name_out` parameter was untyped (Unknown), it made `gzip.open()` call more ambiguous, causing `f_out` to have type of `GzipFile | TextIOWrapper[_WrappedBuffer]` Once `file_name_out` got a type of `str`, it reduces ambiguity and narrows result of `gzip.open()` and hence `f_out` to just be `GzipFile`. You can see this yourself if you go in editor and change `file_name_out` to be Any -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org