When using the meta extension, the Meta field of the Markdown class is not found by Pyright. Perhaps I missed something, can we import a stub file to make this error go away?
For clarity: The code works, but the language server does not find the Meta Member for type Markdown.
This might also happen with the attributes added by other extensions, but I've found it for the meta extension specifically.
Minimal example:
test.py:
import markdown
MD = markdown.Markdown(extensions=['meta'])
with open("foo.md", "r") as f:
content: str = f.read()
html: str = MD.convert(content)
meta = MD.Meta # Cannot access member "Meta" for type "Markdown" Member "Meta" is unknown
print(meta)
foo.md:
key: 19
this is the content
executing the script:
$ python test.py
{'key': ['19']}
Proposed Fix
Add a python stub file for the Meta attribute.