My script writes to file chunk by chunk, using pre-generated data patterns:
# Data pattern generator
def get_random_chunk_pattern():
return
Ignore this warning. The IDE is making a best guess (from limited information) as to what the data type will be at runtime, but it is guessing wrong. That is, it is fairly reasonable to expect that something multiplied by an int
will result in an int
if you don't know what that something actually is.
If you really want to solve this then tell the IDE what you expect chunk.pattern
to be by writing a doc string for your class (or using annotations to provide type hinting).
eg.
class DedupChunk:
"""
:type _chunk_pattern: str
... other fields
"""
... # rest of class