Commit Graph

69 Commits

Author SHA1 Message Date
Florian Bruhin 0c2a673e27 scripts: Clean up build_release 2025-10-24 15:06:20 +02:00
Florian Bruhin aef5355436 Revert "flake8: Disable N808"
This reverts commit a14b986326.

Now allowed in pep8-naming 0.15.1.
2025-05-19 16:05:46 +02:00
Florian Bruhin a14b986326 flake8: Disable N808 2025-05-05 08:15:52 +02:00
Florian Bruhin 5337882657 Adjust linters for dropping Python 3.8 2024-10-13 18:24:44 +02:00
Florian Bruhin 031aff11bc flake8: Remove redundant pytest style options
Default since flake8-pytest-style 2.0.0: https://github.com/m-burst/flake8-pytest-style#change-log
2024-04-09 19:16:17 +02:00
Florian Bruhin 93c7fdd60c Initial Python 3.7 drop 2023-06-26 14:39:54 +02:00
Florian Bruhin 1bd60385eb qt: Add module docstrings and update lint ignores 2023-06-12 21:42:16 +02:00
Florian Bruhin d2c135f031 lint: Disable B028 for tests 2023-03-14 11:59:20 +01:00
Florian Bruhin 1033913276 Update flake8 config for Python 3.6
The 'generator_stop' future import is default in Python 3.7:
https://docs.python.org/3/library/__future__.html

While we do want 'annotations' eventually, it doesn't bring us any gain
right now, see #7098.
2022-04-04 10:51:24 +02:00
Jimmy 060e4fbf80 Drop python3.6 support.
Commits for dropping 3.5 support to copy from:

c245b7d855ccd "Initial drop of Python 3.5"
ccdfb44b85 "Drop support for Python 3.6.0"

Anything needed to update regarding OS version support in
doc/install.asciidoc?
TODO: remove 3.6/7 annotations in requirements files and
  rebuild

workflows: not sure I updated it right (run 5.12 with 3.7, same 18.04 OS) but
18.04 seems to have 3.7 on it too so it should work. It'll all change when we
drop <5.15 anyway. Not sure what the minimum ubuntu version will be going
forward.

Regarding mimetype overrides (ebb3046822) the doctring says they can all go
in 3.7 but .h5 is still missing on py39, not sure if we should care.

There are a bunch of old(?) warning messages still ignored in tests/end2end/fixtures/quteprocess.py.
2022-04-04 12:08:19 +12:00
Florian Bruhin f4714a9300 Use flake8-pytest-style 2022-01-04 10:30:24 +01:00
Florian Bruhin bf373e0ff6 flake8: Disable new N818 2021-07-12 14:29:34 +02:00
Florian Bruhin ccdfb44b85 Drop support for Python 3.6.0
It has some subtle typing differences compared to 3.6.1, see e.g.
https://docs.python.org/3/library/typing.html#typing.NamedTuple

Also, we can't easily test it, it's unlikely to be in use anywhere
anyways, and various dependencies already dropped support for it or are
going to (e.g. PyQt 6).

See #4800
2021-01-08 10:57:22 +01:00
Árni Dagur 4c5e3d9ea0 Merge branch 'master' into more-sophisticated-adblock 2020-12-19 20:29:38 +00:00
Árni Dagur 764ec9c76b Fix flake8 complaints 2020-12-19 20:23:17 +00:00
Florian Bruhin 685a66280a Initial drop of Python 3.5
See #4800
2020-10-26 15:50:54 +01:00
Florian Bruhin 835792e8fa flake8: Turn off pydocstyle D412 2019-08-11 10:08:00 +02:00
Florian Bruhin e08f3da1e1 flake8: Ignore B011 in tests 2019-07-22 11:32:32 +02:00
Florian Bruhin 62059c27f3 Use per-file-ignores built into the new flake8 2019-02-16 18:00:10 +01:00
Florian Bruhin 35a3fe029d Fix lint 2018-12-10 16:33:24 +01:00
Florian Bruhin 96ace5aa99 Update flake8 dependencies 2018-10-29 19:57:54 +01:00
Florian Bruhin 12a7aaed95 flake8: Don't require docstrings for stuff under tests/ 2018-06-11 14:12:47 +02:00
Florian Bruhin 9c6437b3b9 Update comment 2018-04-24 09:53:41 +02:00
Florian Bruhin 51318d66c8 Fix ignore for new flake8-per-file-ignores release 2018-03-20 06:55:05 +01:00
Sebastian Noack 4cf0311d7f Updated flake8-per-file-ignores to version 0.5 2018-03-09 14:09:49 -05:00
Florian Bruhin 4ffdd9da0e Add new B008 to flake8 ignores 2017-12-19 08:57:33 +01:00
Florian Bruhin 75a8938e83 Add flake8-bugbear 2017-11-26 21:50:12 +01:00
Florian Bruhin 1981239478 Add flake8-builtins 2017-11-26 21:22:33 +01:00
Florian Bruhin b5dd647678 Upgrade pydocstyle/flake8-docstrings
See #3320
2017-11-26 20:30:32 +01:00
Ryan Farley 5ed8019115 update flake8 and flake8-deprecated
Updated requirements and adjusted the configuration in `.flake8`; other
files have been modified where the lack of per-file auto-ignore caused
problems, where putty's `# flake8: disable=` syntax could be replaced
with a simpler `noqa`, or where pylint directives already suppressed the
same error.
2017-11-26 00:16:14 -06:00
Ryan Roden-Corrent 71b71dbc58 Merge remote-tracking branch 'upstream/master' into HEAD 2017-08-06 18:13:49 -04:00
Ryan Roden-Corrent 1aed2470e5 SQL code review.
- Fix flake8
- history.clear should also clear completion table
- call _resize_columns in set_model, not set_pattern
- add more unit-testing for the history completion table
2017-07-12 22:14:27 -04:00
Ryan Roden-Corrent ea459a1eca SQL code review fixes.
- Ignore invalid variable name in flake8 (pylint already checks this and
  we don't want to have to double-ignore)
- Fix and test completion bug with `:set asdf `
- Remove unused import
- Use `assert not func.called` instead of `func.assert_not_called` for
  backwards compatibility
2017-07-12 08:19:31 -04:00
Florian Bruhin f98b8a240e Fix flake8 2017-07-04 15:09:23 +02:00
Florian Bruhin 7c4e4a5818 Adjust flake8 config
Since we now ignore this on a per-file level for pylint, we need to do the
same for flake8 too.
2017-04-13 21:12:58 +02:00
Florian Bruhin b9dece8d74 flake8: Ignore E722 2017-02-05 01:45:23 +01:00
Florian Bruhin 7e6edaf93d flake8: Get rid of 'hacking' plugin
It doesn't seem to be intended to be used outside OpenStack, and I'm not
sure if it even works properly in our setup...
2016-11-08 07:07:17 +01:00
Florian Bruhin 5fff70f879 flake8: Disable invalid naming for some modules 2016-09-05 21:35:27 +02:00
Florian Bruhin 42b177474a flake8: Ignore E731 (do not assign a lambda expr) 2016-08-23 07:47:48 +02:00
Florian Bruhin ac2553794c flake8: Ignore all dotfiles 2016-07-21 14:55:50 +02:00
Florian Bruhin 4328169274 flake8 requirements: Get rid of ebb-lint
We've had many checks disabled - these are the ones we actually lose:

    L104
    Docstrings must use Napoleon, not reStructuredText fields.

    L205
    __init__.py is not allowed to contain function or class definitions.

    L206
    Implicit relative imports are not allowed.

    L208
    Pokémon exception handling is always a mistake. If the intent is
    really to catch and ignore exceptions, explicitly name which
    exception types to silence.

    L209
    return, del, raise, assert, print (in python 2, without
    print_function) yield, and yield from are statements, not functions,
    and as such, do not require parentheses.

    L210
    Instead of intentionally relying on the side effects of map, filter,
    or a comprehension, write an explicit for loop.

    L211
    Using map or filter with a lambda as the first argument is always
    better written as list comprehension or generator expression. An
    expression is more readable and extensible, and less importantly,
    doesn't incur as much function call overhead.

    L212
    Using @staticmethod is always wrong.

    L301
    Files must end with a trailing newline.

    L303
    noqa is ignored, and as such, # noqa comments should be deleted to
    reduce pointless noise.

However, most of those are also checked by pylint (and the rest I don't
really care about), and ebb-lint increases flake8's runtime a lot
(45s -> almost 2min).
2016-07-13 07:24:10 +02:00
Florian Bruhin 2b285740d9 Update flake8 requirements
flake8 2.6.0
------------

- Switch to pycodestyle as all future pep8 releases will use that
  package name
- Allow for Windows users on select versions of Python to use --jobs and
  multiprocessing
- Update bounds on McCabe
- Update bounds on PyFlakes and blacklist known broken versions
- Handle new PyFlakes warning with a new error code: F405

flake8-copyright 0.1.1
----------------------

- Set line & column to 1,1 to avoid a flake8 error
- Support multi-year copyright notices

flake8-docstrings 0.2.8
-----------------------

- Try to import pydocstyle (not pycodestyle) as pep257
- Import either pycodestyle or pep8 to use stdin_get_value. This fixes
  the problem for newer Flake8’s (2.6.0+) and older ones.

pycodestyle 2.0.0
-----------------

Announcements:

- Repository renamed to `pycodestyle`
- Added joint Code of Conduct as member of PyCQA

Changes:

- Added tox test support for Python 3.5 and pypy3
- Added check E275 for whitespace on `from ... import ...` lines
- Added W503 to the list of codes ignored by default ignore list
- Removed use of project level `.pep8` configuration file

Bugs:

- Fixed bug with treating `~` operator as binary
- Identify binary operators as unary

Other changes
-------------

- Unpin mccabe as the flake8 requirement got updated
- Pin pep8 as an older version gets installed otherwise
- DIsable D403 warning (false-positivies)
2016-06-20 07:16:59 +02:00
Florian Bruhin 4fccc89d7d Split browser into browser/browser.webkit 2016-06-13 11:18:21 +02:00
Florian Bruhin 3a8ab8ea02 flake8: Set min-version for flake8-future-imports 2016-05-30 23:53:46 +02:00
Florian Bruhin afb88a9560 requirements: Update flake8-future-import to 0.4.0
- Add two older future imports
- Issue an error when a future import does not exist
- Define which is the oldest Python version to be supported so that
  already mandatory features can be ignored and not yet supported
  features default to forbidden (ignoring the lower error code).
- Use return code of 1 if errors occurred
2016-05-30 12:57:57 +02:00
Florian Bruhin b755d56c02 Rename setup.cfg to .flake8
We only use it to store flake8 config, and it turns out flake8 didn't
actually deprecate .flake8.
2016-05-12 22:58:12 +02:00
Florian Bruhin 36803cba06 Switch from flake8 to pytest-{mccabe,flakes,pep8}. 2015-06-02 20:51:06 +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 e04af40140 flake8: Ignore W503. 2015-02-18 14:45:31 +01:00
Florian Bruhin 8f1d81a644 Add session support.
Closes #12.
See #499.
See #11.

This adds PyYAML as a new dependency.

It adds the following new commands:

    :session-delete <name>
    Delete a session.

    :session-load <name>
    Load a session.

    :session-save [<name>]
    Save a session.

    :wq [<name>]
    Save open pages and quit.

And the following new settings:

    general -> save-session:
    Whether to always save the open pages.
2015-02-16 20:26:09 +01:00