Commit Graph

9369 Commits

Author SHA1 Message Date
Florian Bruhin
3b53270ee3 Use hook system for config_changed hook 2018-12-10 15:48:26 +01:00
Florian Bruhin
6001640a8a Guard against double init hooks 2018-12-10 15:24:15 +01:00
Florian Bruhin
93a36c8572 Fix :adblock-update
After #640 we can likely fix this up again.
2018-12-10 15:03:09 +01:00
Florian Bruhin
a146ce865b Register host blocker as request filter 2018-12-10 15:03:09 +01:00
Florian Bruhin
58d179302e Add api.config.get 2018-12-10 15:03:09 +01:00
Florian Bruhin
1b1872e464 Expose a config_changed signal to extensions 2018-12-10 15:03:09 +01:00
Florian Bruhin
42790e7623 Expose config.change_filter 2018-12-10 15:03:09 +01:00
Florian Bruhin
9764472fd8 Move adblock from browser/ to components/ 2018-12-10 15:03:09 +01:00
Florian Bruhin
7ad7623d73 Add request filter API for host blocking
Closes https://github.com/qutebrowser/qutebrowser-extensions/issues/8
2018-12-10 15:03:09 +01:00
Florian Bruhin
3d6f604739 Prepare for moving adblocker to extension API 2018-12-10 15:03:09 +01:00
Florian Bruhin
8806c0925e Expose data and config dir as pathlib.Path 2018-12-10 14:11:16 +01:00
Florian Bruhin
4ad5790311 Add API for temporary downloads
Closes https://github.com/qutebrowser/qutebrowser-extensions/issues/9
2018-12-10 14:08:32 +01:00
Florian Bruhin
b1894f1428 Fix lint 2018-12-10 13:00:41 +01:00
Florian Bruhin
380905854c Pass standarddir to modules 2018-12-10 12:37:58 +01:00
Florian Bruhin
5b354164c5 Make it possible for extensions to define init hooks 2018-12-10 12:37:58 +01:00
Florian Bruhin
38c4ef3623 Fix lint 2018-12-10 12:37:58 +01:00
Florian Bruhin
bb115afc1a Make sure we always yield full names 2018-12-10 12:37:58 +01:00
Florian Bruhin
6bc771151f Make walking components work for PyInstaller
Closes https://github.com/qutebrowser/qutebrowser-extensions/issues/5
2018-12-10 12:37:58 +01:00
Florian Bruhin
15e9127fa0 Add components to pyinstaller hiddenimports 2018-12-10 12:37:58 +01:00
Florian Bruhin
fcb39c1d7f Add types to extensions.loader 2018-12-10 12:37:58 +01:00
Florian Bruhin
411c5171a2 Load components dynamically 2018-12-10 12:37:58 +01:00
Florian Bruhin
735e6123cd Fix lint 2018-12-10 12:37:49 +01:00
Florian Bruhin
b9cb98a5ef mypy: Add types for config.websettings 2018-12-05 17:48:56 +01:00
Florian Bruhin
a9c1fc665f Fix configtypes.Perc.to_str()
If we used an int/float in config.py for a Perc value (e.g. zoom.default),
to_str() returned int/float instead of str, causing qWarnings and bugs.
2018-12-05 17:15:57 +01:00
Florian Bruhin
f53fd56c3d mypy: Add annotations for qutebrowser.config.configtypes 2018-12-05 17:06:45 +01:00
Florian Bruhin
403e63d6f2 Configure coverage.py for "if MYPY:" 2018-12-05 09:05:32 +01:00
Florian Bruhin
c752ba4721 Fix coverage 2018-12-05 08:55:35 +01:00
Florian Bruhin
2770a935e9 Properly fix zoom handling 2018-12-05 07:57:21 +01:00
Florian Bruhin
8a107fa5b3 Fix int_level handling in :zoom 2018-12-04 17:38:50 +01:00
Florian Bruhin
b5a6a5ab8c Merge remote-tracking branch 'origin/pr/4451' 2018-12-04 16:43:25 +01: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
268ad40982 Add and enforce types for api.*/components.* 2018-12-04 15:52:14 +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
13dac9eef5 Revert "Revert "Add types for most of qutebrowser.config""
This reverts commit 7494d238ce.
2018-12-03 15:36:21 +01:00
Florian Bruhin
7494d238ce Revert "Add types for most of qutebrowser.config"
It breaks 'tsh' because of the *values annotation.
This reverts commit 208d3db475.
2018-12-03 13:17:23 +01:00
Florian Bruhin
208d3db475 Add types for most of qutebrowser.config 2018-12-03 12:35:51 +01:00
Florian Bruhin
b0ae4deac8 ADjust check_coverage for api/ 2018-12-03 08:49:10 +01:00
Florian Bruhin
a47ee08a84 Fix wrong/missing argument annotations 2018-12-03 08:45:13 +01:00
Florian Bruhin
ede13c76d9 Fix checking for count in src2asciidoc 2018-12-03 08:44:35 +01:00
Florian Bruhin
ef5e5d84ac Add assert for Command.pos_args 2018-12-03 08:44:10 +01:00
user202729
e81f070a79 Use tojson filter to convert url to Javascript string
Fixes #4450.
2018-12-02 22:56:44 +07:00
Florian Bruhin
4d8c8a5d92 Fix :home with pinned tabs 2018-11-30 16:58:33 +01:00
Florian Bruhin
a7a8f4470b Make ExternalEditor slots private 2018-11-30 16:57:48 +01:00
Florian Bruhin
d484d9363e Fix caret cmds 2018-11-30 16:52:17 +01:00
Florian Bruhin
a0dca95310 Move Command._handle_special_call_arg out of _get_call_args 2018-11-30 16:35:40 +01:00
Florian Bruhin
23d0dbd998 Fix handling of optional values in _add_special_arg
That way, we can pass None as a valid value.
2018-11-30 16:28:43 +01:00
Florian Bruhin
34aaca2aa0 Fix lint 2018-11-30 16:25:19 +01:00
Florian Bruhin
bfa518896a Fix Command.takes_count
Before, what this actually did was checking the .count argument of
a string (the *keys* in self._qute_args). Therefore, it always returned True as
soon as a command had any @cmdutils.argument decorator.
2018-11-30 16:23:34 +01:00
Florian Bruhin
979be017c3 Add components.misccommands 2018-11-30 15:56:16 +01:00
Florian Bruhin
7788a91ed2 Add CommandValue.count_tab 2018-11-30 15:55:50 +01:00