Commit Graph

8745 Commits

Author SHA1 Message Date
Florian Bruhin
a5d2d3109e pylint: Reenable bad-builtin extension 2016-07-11 13:12:52 +02:00
Florian Bruhin
1d237b0569 pylint: ignore wrong-import-position project-wide
While it's more accurate with isort now, we get a wrong-import-position
for everything in scripts/ where we have to do the sys.path magic first.
2016-07-11 13:00:37 +02:00
Florian Bruhin
63b8d225e8 pylint requirements: pylint 1.6
Closes #1632.

new: mccabe
new: isort
deleted: colorama

astroid 1.4.7
-------------

* Stop saving assignment locals in ExceptHandlers, when the context is a store.

  This fixes a tripping case, where the RHS of a ExceptHandler can be redefined
  by the LHS, leading to a local save. For instance, ``except KeyError, exceptions.IndexError``
  could result in a local save for IndexError as KeyError, resulting in potential unexpected
  inferences. Since we don't lose a lot, this syntax gets prohibited.

pylint 1.6.0
------------

* Added a new extension, `pylint.extensions.mccabe`, for warning
  about complexity in code.

* Deprecate support for --optimize-ast.
* Deprecate support for the HTML output.
* Deprecate support for --output-files.

* Fixed a documentation error for the check_docs extension.

* Made the list of property-defining decorators configurable.

* Fix a bug where the top name of a qualified import was detected as unused variable.

* bad-builtin is now an extension check.

* generated-members support qualified name through regular expressions.

  For instance, one can specify a regular expression as --generated-members=astroid.node_classes.*
  for ignoring every no-member error that is accessed as in `astroid.node_classes.missing.object`.

* Add the ability to ignore files based on regex matching, with the new ``--ignore-patterns``
  option.

  This allows for multiple ignore patterns to be specified. Rather than
  clobber the existing ignore option, we introduced a new one called
  ignore-patterns.

* Added a new error, 'trailing-newlines', which is emitted when a file
  has trailing new lines.

* Add a new option, 'redefining-builtins-modules', for controlling the modules
  which can redefine builtins, such as six.moves and future.builtins.

* 'reimported' is emitted when the same name is imported from different module.

* Add a new recommendation checker, 'consider-iterating-dictionary', which is emitted
  which is emitted when a dictionary is iterated through .keys().

* Use the configparser backport for Python 2

  This fixes a problem we were having with comments inside values, which is fixed
  in Python 3's configparser.

* A new error was added, 'invalid-length-returned', when the `__len__`
  special method returned something else than a non-negative number.

* Switch to using isort internally for wrong-import-order.

* check_docs extension can find constructor parameters in __init__.

* Don't warn about invalid-sequence-index if the indexed object has unknown base
  classes.

* Don't crash when checking, for super-init-not-called, a method defined in an if block.

* Do not emit import-error or no-name-in-module for fallback import blocks by default.

  Until now, we warned with these errors when a fallback import block (a TryExcept block
  that contained imports for Python 2 and 3) was found, but this gets cumbersome when
  trying to write compatible code. As such, we don't check these blocks by default,
  but the analysis can be enforced by using the new ``--analyse-fallback-block`` flag.

pylint 1.6.1
------------

* Use environment markers for supporting conditional dependencies.
2016-07-11 13:00:08 +02:00
Florian Bruhin
216d8c3c13 test requirements: Update hypothesis to 3.4.1
On Windows when running two Hypothesis processes in parallel (e.g. using
pytest-xdist) they could race with each other and one would raise an
exception due to the non-atomic nature of file renaming on Windows and
the fact that you can't rename over an existing file. This is now fixed.
2016-07-11 12:45:47 +02:00
Florian Bruhin
c558a8b4ad Add missing docstring 2016-07-11 12:42:51 +02:00
Florian Bruhin
e9d606a782 Move load_status / SSL errors to AbstractTab 2016-07-11 12:09:41 +02:00
Florian Bruhin
6ae232d8fc Move 'progress' to AbstractTab
This makes load progress work with QtWebEngine.
2016-07-11 11:31:59 +02:00
Florian Bruhin
8567fffdad Merge branch 'qtwebengine' 2016-07-11 10:56:20 +02:00
Florian Bruhin
b4f993e2ab Add an early-import for QtWebEngineWidgets 2016-07-11 09:18:05 +02:00
Florian Bruhin
43c1f62e39 Also skip test_tab on PyQt < 5.6
See #1638
2016-07-11 09:10:11 +02:00
Florian Bruhin
86f381a3b7 Skip tests using fake_web_tab on PyQt < 5.6
For some weird reason they cause a segfault in QObject::disconnect since
fake_web_tab was converted to a fixture...

See #1638
2016-07-10 21:42:13 +02:00
Florian Bruhin
01b7b27bda Fix lines which are now too long 2016-07-10 17:33:36 +02:00
Florian Bruhin
b791095324 Rename browser.tab module and classes 2016-07-10 17:27:02 +02:00
Florian Bruhin
2649418c0b Fix lint 2016-07-10 17:04:26 +02:00
Florian Bruhin
d2ece6b542 Move Backend enum to usertypes
Otherwise we have a cyclic import
2016-07-10 17:04:26 +02:00
Florian Bruhin
34e39bed4e Add a test for cmd instance with wrong backend 2016-07-10 17:04:25 +02:00
Florian Bruhin
fd8e66136f tests: Add a mode_manager fixture 2016-07-10 17:04:25 +02:00
Florian Bruhin
52e14950f1 tests: Fix messagemock with stack argument 2016-07-10 17:04:25 +02:00
Florian Bruhin
7859df74c4 Add tests for Command.run 2016-07-10 17:04:25 +02:00
Florian Bruhin
b07cca023b Fix Command.run with no arguments 2016-07-10 17:04:25 +02:00
Florian Bruhin
2136d00aa2 tests: Add a fake_args fixture 2016-07-10 17:04:25 +02:00
Florian Bruhin
949172809d Add tab_registry to test_tab 2016-07-10 16:57:02 +02:00
Florian Bruhin
e36123735b Use a fixture for FakeWebTab
We need to make sure qapp and tab_registry are available everywhere the
FakeWebTab class is used.
2016-07-10 16:57:02 +02:00
Florian Bruhin
0ab601aaf3 Make it possible to limit commands to backends 2016-07-10 16:57:02 +02:00
Florian Bruhin
11cd5f8653 Don't register webview in objreg
All places now should use the tab API instead.
2016-07-08 17:21:33 +02:00
Florian Bruhin
67eea1678e Move tab registry from webview to tab 2016-07-08 17:13:18 +02:00
Florian Bruhin
dcf39538a3 Improve objreg error message if no window is given 2016-07-08 17:09:20 +02:00
Florian Bruhin
7360ea69ba Fix lint 2016-07-08 13:08:31 +02:00
Florian Bruhin
06a6daee34 Add stubs for QtWebEngine 2016-07-08 12:53:48 +02:00
Florian Bruhin
cc11af5e28 Fix lint 2016-07-08 11:21:00 +02:00
Florian Bruhin
b0fa821bc3 pylint: Disable duplicate-code globally
We can't disable it more fine-grained:
https://github.com/PyCQA/pylint/issues/214

I think for the shown duplicate (histroy in webkittab/webenginetab) it
makes no sense to refactor things as a Mixin...
2016-07-08 11:03:27 +02:00
Florian Bruhin
b1fda1b0ef Get rid of tab.run_webaction
As mentioned here:
e4b0b7fffd (r70002693)

It makes no sense to add a backend-specific run_webaction method to
AbstractTab - better to just access _widget directly in this one place
instead of adding something backend-speficic to the API.
2016-07-08 10:42:54 +02:00
Florian Bruhin
55784f9783 Add tab.create() helper function 2016-07-08 10:38:52 +02:00
Florian Bruhin
334f6cda4f tab: Rename modeman to mode_manager
To avoid it being mixed up with the modeman module
2016-07-08 10:38:51 +02:00
Florian Bruhin
7c6dd60f35 Fix test_on_tab_changed in statusbar.url tests
- The invalid URL will now get encoded when using QUrl.
- The check for a None url_text is somewhat pointless as I don't think
  this can ever happen in the real circumstances.
2016-07-08 10:38:51 +02:00
Florian Bruhin
37d20023b3 Remove now unneeded vulture ignore
We're now using __slots__
2016-07-08 10:10:08 +02:00
Florian Bruhin
f9eecaf584 Fix typo 2016-07-08 10:09:49 +02:00
Florian Bruhin
782561462b Use stubs.FakeWebTab to fake tabs
This also fixes the cur_url access.
2016-07-08 10:09:03 +02:00
Florian Bruhin
09f4c2199e Rename widget to tab in some places
This also fixes the cur_url access.
2016-07-08 10:08:44 +02:00
Florian Bruhin
b8086d1d13 mhtml: web_view -> tab rename
Otherwise this sounds like we still have a QWebView.
This also fixes the cur_url access.
2016-07-08 10:08:11 +02:00
Florian Bruhin
2befebaf3a Don't use properties for AbstractTab
Otherwise exceptions in there could be hidden by Python/PyQt.

Some places are not changed yet, as there are also other renames in the
next commits.
2016-07-08 10:05:46 +02:00
Florian Bruhin
ecd399181d Fix AbstractSearch attribute docs 2016-07-08 09:15:28 +02:00
Florian Bruhin
3bb5b5d1c9 Merge branch 'blyxxyz-status-position' 2016-07-08 09:11:29 +02:00
Florian Bruhin
b5c1db6bae Merge branch 'status-position' of https://github.com/blyxxyz/qutebrowser into blyxxyz-status-position 2016-07-08 09:10:26 +02:00
Florian Bruhin
9898b1af37 pylint: Remove -j0
See https://github.com/PyCQA/pylint/issues/987

On my laptop I get about a 3m -> 2m20s speedup, which isn't really worth
the trouble...
2016-07-07 23:22:42 +02:00
Jan Verbeek
a8c55ffe08 Stop downloads bar from pushing away status bar 2016-07-07 23:11:08 +02:00
Florian Bruhin
e4b0b7fffd Fix lint 2016-07-07 20:12:17 +02:00
Florian Bruhin
70fb9bfd51 Regenerate docs again 2016-07-07 20:08:12 +02:00
Florian Bruhin
dde8ac6844 Use __slots__ for tab.TabData 2016-07-07 19:36:27 +02:00
Florian Bruhin
b999090a51 Hide --backend argument for now 2016-07-07 19:28:00 +02:00