Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pylint doesn't support pygments lexers/formatters #491

Open
pylint-bot opened this issue Mar 11, 2015 · 1 comment
Open

pylint doesn't support pygments lexers/formatters #491

pylint-bot opened this issue Mar 11, 2015 · 1 comment
Labels
Bug 🪲 Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)

Comments

@pylint-bot
Copy link

pylint-bot commented Mar 11, 2015

Originally reported by: Florian Bruhin (BitBucket: The-Compiler, GitHub: @The-Compiler?)


For this code:

import pygments.lexers
import pygments.formatters

foo = pygments.lexers.HtmlLexer
bar = pygments.formatters.HtmlFormatter

pylint shows Module 'pygments.lexers' has no 'HtmlLexer' member (no-member) and Module 'pygments.formatters' has no 'HtmlFormatter' member (no-member).

It seems pygments does some magic with sys.modules for its lexers/formatters, so maybe this is too complicated for pylint to handle. Just opening this if there's some existing easy mechanism in pylint for this.


@pylint-bot
Copy link
Author

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):


Yes, there is a mechanism, astroid.brain tips. We already have something for these type of modules: pytest, nose etc. Adding one for pygments.lexers shouldn't be that hard.

@PCManticore PCManticore added this to the 1.7.0 milestone May 9, 2016
@PCManticore PCManticore removed this from the 2.2 milestone Aug 11, 2016
versat added a commit to versat/cppcheck that referenced this issue Nov 4, 2019
The error that pylint does not find HtmlFormatter in pygments.formatters
is known and the common solution is to suppress this error.
See pylint-dev/pylint#491
amai2012 pushed a commit to danmar/cppcheck that referenced this issue Nov 4, 2019
…2326)

The error that pylint does not find HtmlFormatter in pygments.formatters
is known and the common solution is to suppress this error.
See pylint-dev/pylint#491
msuozzo pushed a commit to msuozzo/pylint that referenced this issue Feb 18, 2022
* chore: update Java and Python dependencies

PiperOrigin-RevId: 408420890

Source-Link: googleapis/googleapis@2921f9f

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
@Pierre-Sassoulas Pierre-Sassoulas changed the title pylint doesn't support pylint lexers/formatters pylint doesn't support pygments lexers/formatters Jun 29, 2022
@Pierre-Sassoulas Pierre-Sassoulas added the Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade) label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 Needs astroid Brain 🧠 Needs a brain tip in astroid (then an astroid upgrade)
Projects
None yet
Development

No branches or pull requests

3 participants