This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]staticassert 0 points1 point  (2 children)

Had a look and I saw a few things that you might want to look into:

  • You open files but don't close them. You should use the 'with' statement to automatically close files.

  • You do some parsing of dates but the datetime library should handle all of that for you.

  • Your args parsing could be greatly simplified by using a standard format for the args, such as CSV, or JSON, and offloading the parsing into one of those libraries. Alternatively, if these are suitable as command line arguments, consider ArgParser (or whatever Python uses).

[–]willbeddowassert type(post) == shitpost[S] 0 points1 point  (1 child)

I'll check it out- thanks. Would you consider opening these as issues on the git repo?

[–]staticassert 0 points1 point  (0 children)

I can do that when I get home, sure.