Commit Graph

18 Commits

Author SHA1 Message Date
Florian Bruhin 100e87ff0e pylint: Remove now-useless suppressions 2021-12-02 17:43:45 +01:00
Florian Bruhin ac2576c61d command: Improve deprecation
Add a test and also allow setting a deprecated alias for a command
easily.
2021-01-27 15:08:41 +01:00
Florian Bruhin 61ce42fc74 Update test_typed_args for lazy annotations
This unfortunately gets quite a bit more cumbersome, as we can't easily
parametrize an annotation anymore - the former `typ` will just be lazily
evaluated as the string "typ".

Closes #5769
2021-01-26 20:32:46 +01:00
Florian Bruhin 41dc291309 Add initial support for Python 3.10 annotations
PEP 563: https://www.python.org/dev/peps/pep-0563/
See #5769
2021-01-26 20:32:31 +01:00
Florian Bruhin 1a4fff1a42 doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
Florian Bruhin 222f1f19a1 Bump copyright years
Closes #6015
2021-01-20 20:06:19 +01:00
Tim Brown 0a9b85c310 mypy: use from-import for typing in remaining files
I believe this should close #5396
2020-10-31 22:52:00 +10:00
Florian Bruhin 46302e488f Use enum.auto() for most enum values
Doesn't change values where they are chosen to line up with Qt enums.

See #4800
2020-10-26 15:50:54 +01:00
Florian Bruhin 518e9497d7 Make pylint happy 2020-10-16 16:42:17 +02:00
Yegor b2dd22c5e9 Use class-based API instead of functions for enums 2020-10-09 20:04:49 +03:00
Florian Bruhin 049d51d1d7 Fix lint 2020-06-11 17:23:59 +02:00
Florian Bruhin 025a70254f commands: Add some additional tests for *args handling
(cherry picked from commit 3983a6d3ee30f86b1afd809bc786322cbff8fd55)
2020-06-11 15:49:23 +02:00
Florian Bruhin 9e4276db9b Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00
Jay Kamat 3e816f5f8b
Update copyright for 2019 2019-02-22 21:45:08 -08:00
Florian Bruhin 2cb277afd7 Fix exception messages in Command
The messages weren't updated in ac78039171.
2018-12-04 16:30:01 +01:00
Florian Bruhin 71f9c5d206 Fix handling of annotated varargs in commands
When we have something like "*values: str" in :config-cycle, we get a list of
values, but the type converter assumes it's a string.

We could implement proper conversion of *args, but for now, let's just make
sure it's always a string.
2018-12-03 15:55:04 +01:00
Florian Bruhin 569bb0fa09 Add cmdutils.Value instead of using count=True/win_id=True 2018-11-30 12:45:01 +01:00
Florian Bruhin b7de287e7b Move CommandError to api.cmdutils 2018-11-29 14:18:11 +01:00