Commit Graph

93 Commits

Author SHA1 Message Date
Florian Bruhin 3f28983dcb pylint: Bump up maximum line length to 88
For compatibility with black if people want to start using it for new code.

See #4770, #1455
2020-08-03 16:37:19 +02:00
Florian Bruhin 47470e9727 Fix lint 2020-04-15 21:07:28 +02:00
Florian Bruhin ff6f3a0905 Delete qute_pylint.settrace
This is handled by flake8-debugger
2020-01-13 08:09:35 +01:00
Florian Bruhin 45b8219f05 pylint: Remove known-* workaround 2019-10-01 12:42:30 +02:00
Florian Bruhin 692f8241ca pylint: Add trailing commas to config 2019-10-01 12:38:53 +02:00
Florian Bruhin 24eaecdd09 pylint: Enable overlapping_exceptions
It was moved to a pylint extension because it makes no sense for polyglot
Python 2/3 code, but we're not doing that.
2019-10-01 12:38:30 +02:00
Florian Bruhin c9386b753a pylint: Enable broad_try_clause 2019-10-01 12:37:58 +02:00
Florian Bruhin 8cd65dcc1b pylint: Enable emptystring extension 2019-10-01 12:35:55 +02:00
Florian Bruhin 5dd784fcfc pylint: Skip bad-builtin extension 2019-10-01 12:26:06 +02:00
Florian Bruhin 2fa32246c7 pylint: Ignore DummyBox errors
pylint complains because msgbox.msgbox() can return DummyBox, but we know
that's not the case in tests/unit/misc/test_msgbox.py.
2019-10-01 12:20:17 +02:00
Florian Bruhin 4ff40fb746 pylint: Disable no-else-continue 2019-10-01 12:14:34 +02:00
Florian Bruhin 59f5d00ce7 pylint: Ignore import-outside-toplevel
There are good reasons to do those.
2019-10-01 12:07:22 +02:00
Jay Kamat b28a42f4aa
Disable bad-builtin pylint rule 2019-04-02 21:46:09 -07:00
Florian Bruhin 51097f1e0a Fix lint 2018-09-27 23:42:08 +02:00
Florian Bruhin c506ffa4cd pylint: More config adjustments 2017-12-15 23:17:28 +01:00
Florian Bruhin 430126dcc8 pylint: Re-enable ungrouped-imports 2017-12-15 23:08:53 +01:00
Florian Bruhin 21bf446147 Reorder pylint ignores 2017-12-15 20:06:12 +01:00
Florian Bruhin e65c0dd8a7 pylint: Re-enable bad-continuation
And lots and lots of whitespace changes.
2017-12-15 19:16:55 +01:00
Florian Bruhin 4c24b9ed4a Reorder pylint disables 2017-12-15 17:16:55 +01:00
Florian Bruhin bb44f1d4cc Remove old pylint disables 2017-12-15 14:39:42 +01:00
Florian Bruhin a4101662b2 pylint: Disable logging-not-lazy
We log to RAM anyways
2017-12-15 14:29:50 +01:00
Florian Bruhin 0b86b302a2 pylint: Turn off some more too-many-* stuff globally
Humans are just better at judging what's okay here than a machine.
2017-10-31 07:35:00 +01:00
Ryan Roden-Corrent 8f068dda1b Disable pylint's too-many-boolean-expressions. 2017-10-27 07:23:41 -04:00
Florian Bruhin bdc82bc633 Fix lint
See https://github.com/PyCQA/pylint/issues/1698
2017-10-11 08:41:23 +02:00
Florian Bruhin 3a5241b642 Start using attrs
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin cb806aefa3 Initial config.py support
See #2795
2017-09-14 17:38:33 +02:00
Florian Bruhin f67cf17055 Hopefully fix pylint on AppVeyor... 2017-05-17 22:47:17 +02:00
Florian Bruhin edd10aac56 pylint: Add more stuff to known-standard-library 2017-05-17 22:14:17 +02:00
Florian Bruhin 00a7a0cee6 Reorganize pylint config
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin 12520bf4ba Install PyQt from PyPI for pylint
This means we can be sure to have QtWebEngine available and won't have QtWebKit.
2017-05-17 19:08:59 +02:00
Florian Bruhin 52b448e368 pylint: Ignore no-else-return
This will be added in the next pylint release, and it seems we can already add
it without getting an error.
2017-03-23 20:51:37 +01:00
Florian Bruhin f86f9cd92a Refactor qtutils.version_check API
Fixes #2423
2017-03-08 08:41:18 +01:00
Florian Bruhin 6bdf8495aa pylint: Disable too-many-boolean-expressions 2017-03-08 05:06:35 +01:00
Florian Bruhin c876c3d244 Fix lint 2016-11-04 18:49:24 +01:00
Florian Bruhin 77aa8b4337 pylint: Use ignored-modules for pytest
See https://github.com/PyCQA/astroid/pull/357
2016-08-23 07:45:31 +02:00
Florian Bruhin c4fb43df58 pylint: Set persistent=n
See #1637
2016-07-20 15:51:57 +02:00
Florian Bruhin 64dc099d51 pylint: Enable docstyle extension 2016-07-11 13:47:18 +02:00
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 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 40f0aa0023 Fix pylint without QtWebEngine available 2016-07-07 18:32:52 +02:00
Florian Bruhin 17466b4f26 Fix some lint 2016-07-07 18:32:52 +02:00
Florian Bruhin 4fccc89d7d Split browser into browser/browser.webkit 2016-06-13 11:18:21 +02:00
Florian Bruhin 9d018b8fbd pylint: Disable too-many-return-statements 2016-05-26 07:39:47 +02:00
Florian Bruhin a0d0b6464f Use typing.py-like annotations for command args
This means:

- An annotation like (int, str) is now typing.Union[int, str].
- utils.typing got expanded so it acts like the real typing.py, with
  issubclass() working properly with typing.Union and __union_params__
  being set.
- A literal string doesn't exist anymore as annotation, instead
  @cmdutils.argument now has a 'choices' argument which can be used like
  @cmdutils.argument('arg', choices=['val1', 'val2']).
- Argument validating/converting is now entirely handled by
  argparser.type_conv instead of relying on python's argparse, i.e.
  type/choices is now not passed to argparse anymore.
2016-05-18 06:55:17 +02:00
Florian Bruhin 0b362e76ea Move pylint plugins to an installed package.
This means we can now run things like running pylint --version without having
to set PYTHONPATH correctly now.

When using skip_install=true, the plugins wouldn't work as they need to import
qutebrowser.

We have to keep setting PYTHONPATH in run_pylint_on_tests.py, otherwise we get
this error I don't quite understand:

    F:  1, 0: error while code parsing: Unable to load file
    '/home/florian/proj/qutebrowser/git/__init__.py' ([Errno 2] No such
    file or directory: '...') (parse-error)
2016-02-19 07:15:09 +01:00
Florian Bruhin 7a268a41f6 pylint: Don't require docstring for main() funcs. 2016-02-01 20:06:49 +01:00
Florian Bruhin 483d246e0d pylint: Allow long lines with # pylint: disable=... 2016-01-22 19:38:53 +01:00
Florian Bruhin 6eeb3fa32c pylint: Allow long lines for copyright. 2016-01-04 08:22:33 +01:00
Florian Bruhin 4e888e8e19 pylint: Re-enable wrong-import-position.
This now works due to a fix in pylint 1.5.1.
2015-12-02 18:14:44 +01:00