Starou / SimpleIDML

Manipulate Adobe® InDesign® IDML files
Other
209 stars 35 forks source link

Use a context or tempfile.mkstemp in decorators.py#use_working_copy #56

Open Starou opened 4 years ago

Starou commented 4 years ago

https://github.com/Starou/SimpleIDML/blob/73fc7d80096a09d684ddf2390bb4a72b9ef74d60/src/simple_idml/decorators.py#L27

Followed by https://github.com/Starou/SimpleIDML/blob/master/src/simple_idml/decorators.py#L58

This could be refactored since "Unlike TemporaryFile(), the user of mkstemp() is responsible for deleting the temporary file when done with it."

https://docs.python.org/3.7/library/tempfile.html#tempfile.mkstemp