Skip to main content
2 of 3
added 120 characters in body
Grajdeanu Alex
  • 9.3k
  • 4
  • 32
  • 71

###Use Python 3.x

Python 2.7 will retire in 2020 (end of support) so I'd sugest you migrate your project to a newer version.

###Other aspects apart from what @Ludisposed already mentioned:

  • you're using line.strip() in several places so you might want to assign it to a new variable and use that instead.
  • declare the migrateList as a constant at the top of the file (under your imports). That way it will be easier to be modified.
  • use f-strings (Python > 3.6). E.g: f"{gitUrl}{line.strip()}.git"
  • don't use globals. The reason they are bad is that they allow functions/variables to have hidden (as in non-obvious and undeclared) and thus hard to understand side effects. Also, this can lead to Spaghetti code.
  • PEP8: leave an empty space after # in your comments. E.g: # configure gitUri for each repository
  • PEP8:

Imports should be grouped in the following order:

  • Standard library imports.
  • Related third party imports.
  • Local application/library specific imports.
  • You should put a blank line between each group of imports.
Grajdeanu Alex
  • 9.3k
  • 4
  • 32
  • 71