Commit Graph

72 Commits

Author SHA1 Message Date
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
Florian Bruhin
eff0e4c7cc pylint: Enable useless-suppression globally.
We deactivate it locally where needed, i.e. where we are sure it's some
platform-specific thing.
2015-12-01 23:01:09 +01:00
Florian Bruhin
251e657bd1 pylint: Disable some messages again.
See https://bitbucket.org/logilab/pylint/issues/713/
This partially reverts a42d99a8b7.
2015-12-01 07:10:39 +01:00
Florian Bruhin
a42d99a8b7 pylint: Get rid of some customizations in pylintrc 2015-11-30 21:08:17 +01:00
Florian Bruhin
9755a9b00f pylint: Improve ignored-classes list. 2015-11-30 21:08:17 +01:00
Florian Bruhin
5b5003d599 pylint: Use qualified names for ignored-classes. 2015-11-30 21:08:17 +01:00
Florian Bruhin
99258dac46 pylint: Remove defining-attr-methods from pylintrc. 2015-11-30 21:08:17 +01:00
Florian Bruhin
5dc891f207 pylint: Move expected-line-ending-format to config. 2015-11-30 21:08:17 +01:00
Florian Bruhin
48252258dd Disable some new pylint checks. 2015-11-30 07:16:24 +01:00
Florian Bruhin
6e392f0f09 Add workarounds for pylint/astroid update. 2015-11-30 07:16:12 +01:00
Florian Bruhin
381d857f2c Revert "Add workarounds for issues with pylint tip."
This reverts commit 1d2683993e.
This causes a bad-option-value issue with the current pylint.
2015-10-26 22:05:21 +01:00
Florian Bruhin
1d2683993e Add workarounds for issues with pylint tip. 2015-10-26 21:20:11 +01:00
Florian Bruhin
62fde783be pylint: Increase maximum function name length. 2015-08-02 19:51:48 +02:00
Florian Bruhin
b35a1f3d15 pylint: Change maximum method name length to 50.
40 wasn't enough for tests.
2015-07-23 20:55:21 +02:00
Florian Bruhin
4007027617 pylint: Change minimal length for docstrings to 3. 2015-07-23 11:32:19 +02:00
Florian Bruhin
90bbe4d1ef Make ci_install.py python2 compatible. 2015-06-11 17:09:17 +02:00
Florian Bruhin
4a909aa028 Use pylint's built-in checker to check for CRLF. 2015-06-04 15:25:36 +02:00
Florian Bruhin
9d44f777c0 Fix lint. 2015-04-05 20:30:31 +02:00
Florian Bruhin
f518b5b7f2 lint: Move options from parameters to config files.
This is needed for tox support as we get rid of run_checks.py.
2015-03-26 07:56:55 +01:00
Florian Bruhin
8811947f50 Re-enable some pylint checks. 2015-03-23 07:04:41 +01:00
Florian Bruhin
e8e6d8409b Adjust pylint exceptions. 2015-03-11 20:14:39 +01:00
Florian Bruhin
33a2181e31 Record global page history to disk.
We currently don't do anything with it yet, but people could use it in scripts
already and we have the history later when completion or other stuff will be
added based on it.

See #33.
2015-02-01 22:27:58 +01:00