I'm trying to single-step through pywikibot using vscode. I've got:
certifi==2024.2.2 charset-normalizer==3.3.2 idna==3.6 iniconfig==2.0.0 mwparserfromhell==0.6.6 packaging==23.2 pluggy==1.4.0 pytest==8.0.2 pytest-mock==3.12.0 pywikibot==8.6.0 requests==2.31.0 urllib3==2.2.1
vscode: Version: 1.87.1 MacOS Ventura 13.6.4 Python 3.11.8
I'm getting a bunch of Pylance errors (warnings?) _basepage.py of the form:
Variable not allowed in type expression
It seems to be complaining about the "Dict" in:
def protection(self) -> Dict[str, Tuple[str, str]]:
Any idea what's going on?
Hi Roy,
I've never used pylance, but I'd guess that it doesn't like how we use types from pywikibot.backports that vary depending on python version. Some of these will go away with pywikibot 9 (just released).
Regards, JJ
On Fri, Mar 8, 2024 at 9:51 AM Roy Smith roy@panix.com wrote:
I'm trying to single-step through pywikibot using vscode. I've got:
certifi==2024.2.2
charset-normalizer==3.3.2
idna==3.6
iniconfig==2.0.0
mwparserfromhell==0.6.6
packaging==23.2
pluggy==1.4.0
pytest==8.0.2
pytest-mock==3.12.0
pywikibot==8.6.0
requests==2.31.0
urllib3==2.2.1
vscode: Version: 1.87.1
MacOS Ventura 13.6.4
Python 3.11.8
I'm getting a bunch of Pylance errors (warnings?) _basepage.py of the form:
Variable not allowed in type expression
It seems to be complaining about the "Dict" in:
def protection(self) -> Dict[str, Tuple[str, str]]:
Any idea what's going on?
pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/me... To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org