summaryrefslogtreecommitdiffstats
path: root/subcmds/stage.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix blank line issues reported by flake8David Pursehouse2020-02-121-0/+3
| | | | | | | | | | | | | | | | | | | | - E301 expected 1 blank line - E302 expected 2 blank lines - E303 too many blank lines - E305 expected 2 blank lines after class or function definition - E306 expected 1 blank line before a nested definition Fixed automatically with autopep8: git ls-files | grep py$ | xargs autopep8 --in-place \ --select E301,E302,E303,E305,E306 Manually fix issues in project.py caused by misuse of block comments. Change-Id: Iee840fcaff48aae504ddac9c3e76d2acd484f6a9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254599 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: David Pursehouse <dpursehouse@collab.net>
* set default file encoding to utf-8Mike Frysinger2019-06-131-0/+1
| | | | | | | | There's no reason to support any other encoding in these files. This only affects the files themselves and not streams they open. Bug: https://crbug.com/gerrit/10418 Change-Id: I053cb40cd3666ce5c8a0689b9dd938f24ca765bf
* Fix "list comprehension redefines 'x'" warnings from pyflakesDavid Pursehouse2017-07-101-2/+2
| | | | | | | | | $ git ls-files | grep py$ | xargs pyflakes subcmds/stage.py:101: list comprehension redefines 'p' from line 63 subcmds/sync.py:784: list comprehension redefines 'p' from line 664 subcmds/upload.py:467: list comprehension redefines 'avail' from line 454 Change-Id: Ia65d1a72ed185ab3357e1a91ed4450c719e75a7c
* stage: replace filter on lambda with list comprehensionDavid Pursehouse2013-05-081-4/+4
| | | | | | | | To fix the pylint warning: W0110: map/filter on lambda could be replaced by comprehension Change-Id: Ib914b42992bb2fbfe888a68fb7b05a7695565b63
* Change print statements to work in python3Sarah Owens2012-11-131-2/+3
| | | | | | This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
* Change usages of xrange() to range()Sarah Owens2012-11-011-1/+1
| | | | | | | | | | | | In Python3, range() creates a generator rather than a list. None of the parameters in the ranges changed looked large enough to create an impact in memory in Python2. Note: the only use of range() was for iteration and did not need to be changed. This is part of a series of changes to introduce Python3 support. Change-Id: I50b665f9296ea160a5076c71f36a65f76e47029f
* Coding style cleanupDavid Pursehouse2012-10-091-7/+7
| | | | | | | | | | | | | | | Fix the following issues reported by pylint: C0321: More than one statement on a single line W0622: Redefining built-in 'name' W0612: Unused variable 'name' W0613: Unused argument 'name' W0102: Dangerous default value 'value' as argument W0105: String statement has no effect Also fixed a few cases of inconsistent indentation. Change-Id: Ie0db839e7c57d576cff12d8c055fe87030d00744
* Only display project path in 'repo stage -i'Shawn O. Pearce2009-04-181-2/+2
| | | | | | | Generally we only show the project path, relative from the top of the client. Showing the project name may be confusing for the end-user. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Initial Contributionv1.0The Android Open Source Project2008-10-211-0/+108