viztracer icon indicating copy to clipboard operation
viztracer copied to clipboard

some small changes

Open JessyTsui opened this issue 2 years ago • 4 comments

JessyTsui avatar Aug 31 '22 14:08 JessyTsui

  1. The imported modules and packages are formatted using a plugin called isort, which is based on PEP-8 specification.

  2. Besides that, I found a code snippet that was repeated three times, so I refactored it.

  3. tempfile.TemporaryDirectory() at the end is where I found a possible try-finally logic problem. I had only ever used os.makedirs() before, so I looked through the tempfile doc and found the perhaps better tempfile.TemporaryDirectory() method, which will delete itself when it is done.

JessyTsui avatar Aug 31 '22 14:08 JessyTsui

Next time please do not name your PR as some small changes. Use a more informative name for your changes.

gaogaotiantian avatar Aug 31 '22 17:08 gaogaotiantian

Next time please do not name your PR as some small changes. Use a more informative name for your changes.

ok...I just have no idea how to name it at the moment, I'll think more next time

JessyTsui avatar Sep 01 '22 02:09 JessyTsui

ok...I just have no idea how to name it at the moment, I'll think more next time

Actually, the PR title can be modified by clicking the Edit button beside the title on this page, so you can change it THIS time. :D

As for the commit, I just learned some git actions recently that may also help you. You can use git commit --amend to change the commit comment or use git rebase -i to interactively split the commit into multiple ones. Since these actions will completely change the commit including its hash, so when you git push these commits, you may need to attach a --force-with-lease option. Feel free to try!

Sefank avatar Sep 02 '22 08:09 Sefank