Commit Graph

13 Commits

Author SHA1 Message Date
Jun Wu
584656dff3 codemod: join the auto-formatter party
Summary:
Turned on the auto formatter. Ran `arc lint --apply-patches --take BLACK **/*.py`.
Then run `arc lint` again so some other autofixers like spellchecker etc. looked
at the code base. Manually accept the changes whenever they make sense, or use
a workaround (ex. changing "dict()" to "dict constructor") where autofix is false
positive. Disabled linters on files that are hard (i18n/polib.py) to fix, or less
interesting to fix (hgsubversion tests), or cannot be fixed without breaking
OSS build (FBPYTHON4).

Conflicted linters (test-check-module-imports.t, part of test-check-code.t,
test-check-pyflakes.t) are removed or disabled.

Duplicated linters (test-check-pyflakes.t, test-check-pylint.t) are removed.

An issue of the auto-formatter is lines are no longer guarnateed to be <= 80
chars. But that seems less important comparing with the benefit auto-formatter
provides.

As we're here, also remove test-check-py3-compat.t, as it is currently broken
if `PYTHON3=/bin/python3` is set.

Reviewed By: wez, phillco, simpkins, pkaush, singhsrb

Differential Revision: D8173629

fbshipit-source-id: 90e248ae0c5e6eaadbe25520a6ee42d32005621b
2018-05-25 22:17:29 -07:00
Pulkit Goyal
6b74a599aa py3: handle keyword arguments in hgext/automv.py
Differential Revision: https://phab.mercurial-scm.org/D1296
2017-10-22 23:52:22 +05:30
Pierre-Yves David
6b8771d327 configitems: register the 'automv.similarity' config
Default value has been ported.
2017-06-30 03:27:24 +02:00
Jun Wu
0ac1f68fc3 automv: use lowercase for docstring title
The first line of docstring is used in `hg help -e`. Use lowercase to be
consistent with most extensions.
2017-03-23 21:15:39 -07:00
Yuya Nishihara
a5c934df3c py3: move up symbol imports to enforce import-checker rules
Since (b) is banned, we should do the same for (a) for consistency.

 a) from mercurial import hg
    from mercurial.i18n import _

 b) from . import hg
    from .i18n import _
2016-05-14 14:03:12 +09:00
Martijn Pieters
e5e2edc668 automv: use 95 as the default similarity threshold
The motivation for the change from 100 to 95 is included in a comment.

* Updated the tests to include a change to a moved file that still should be
  caught as a move.

* Use ui.configint() to non-integer configuration entries more gracefully. Also
  complain if a similarity outside of the acceptable range is set.
2016-02-16 15:58:32 +00:00
Martijn Pieters
4dd3a04b71 automv: switch to specifying the similarity as an integer (0-100)
This is consistent with the addremove --similarity option.
2016-02-15 17:24:42 +00:00
Martijn Pieters
81fb7c878b automv: do not release lock between marking files and the actual commit 2016-02-15 17:16:07 +00:00
Martijn Pieters
e49ba6cb7c automv: reuse existing scutil._markchanges() function 2016-02-15 17:13:18 +00:00
Martijn Pieters
3e662b50fe automv: improve function docstrings 2016-02-15 17:01:33 +00:00
Martijn Pieters
9f4bfd63cd automv: remove test for 'developer mode'
The tests no longer use this mode, the test is entirely redundant.
2016-02-15 16:51:31 +00:00
Martijn Pieters
58c369c4ac automv: simplify retrieving the status
The default is to show the status in the current working copy, no need to pass
in the parent and working copy context here.
2016-02-15 16:40:06 +00:00
Martijn Pieters
4b490ea150 automv: new experimental extension
Automatically detect moves and record them at commit time.

This extension was originally developed at
https://bitbucket.org/facebook/hg-experimental
2016-02-08 13:52:51 +00:00