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

config for pyproject.toml #17

Closed
jdhao opened this issue Jul 25, 2023 · 3 comments
Closed

config for pyproject.toml #17

jdhao opened this issue Jul 25, 2023 · 3 comments

Comments

@jdhao
Copy link

jdhao commented Jul 25, 2023

This is what is working for me:

[tool.pylint.main]
init-hook ="""
try:
  import pylint_venv
except ImportError:
  pass
else:
  pylint_venv.inithook()
"""

The config in readme does not work due to parsing issues. Test on pylint 2.17.2

@jgosmann
Copy link
Owner

The config in the README is intended for the .pylintrc file, not pyproject.toml. Did you verify that there is indeed a problem with the given .pylintrc config independent of configuration via pyproject.toml?

@Ash8888
Copy link

Ash8888 commented Oct 16, 2023

This is what is working for me:

Thanks jdhao, this worked for me as well.

The config in the README is intended for the .pylintrc file, not pyproject.toml.

Maybe classifying this issue as a documentation request (rather then a parsing error) is the way to go? I'm not sure how ubiquitous pyproject.toml is becoming elsewhere, but I am using it on new projects. I appreciate that I could cut & paste the code provided rather then having to translate .pylintrc to .toml - I don't work with .pylintrc very often. It would be better if I was cutting and pasting from an official source instead of an issue report. imho.

@jgosmann
Copy link
Owner

@Ash8888 fair point, would you be willing to prepare a PR?

jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
jgosmann added a commit that referenced this issue Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants