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

Make pyre able to read configuration from pyproject.toml #799

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

WangGithubUser
Copy link
Contributor

@WangGithubUser WangGithubUser commented Sep 29, 2023

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

This PR resolves #695.
I'm not sure we should look for pyproject.toml silently when .pyre_configuration is not valid, or only look for it when a flag provided.But, I prefer the first resoulution because the second need to provide a flag in all runs.However, I want to hear you opinion.

Test Plan

Look for if the unittest passed.
As the unittest is not avalible this time(see footnote), I ran test in my local machine with python3.10:
image

Footnote:

  • GitHub Action workflow Test fails due to match statement is incompatible with Python3.8 and 3.9, and is not related to this PR.To make this easier to review and avoid confliting, I will rebase this PR on the top of main if the match statement refactored with if-elif-else statement but not do it in this PR.
  • As a post-process, we need to delete unneeded .pyre_configuration at the root of this project after the nightly version of Pyre with this diff deployed.I intergrated configurations into pyproject.toml.

@WangGithubUser WangGithubUser marked this pull request as draft October 3, 2023 10:48
@WangGithubUser WangGithubUser force-pushed the read_config_from_pyproject branch 2 times, most recently from e6aaa24 to 58f2492 Compare October 4, 2023 04:56
@cclauss
Copy link
Contributor

cclauss commented Apr 2, 2024

Is this still a Draft PR?

@hparente1313
Copy link

@WangGithubUser @cclauss Is this still active? Would love to see this feature.

@@ -48,6 +48,9 @@
{
"is_toplevel_module": true,
"site-package": "typing_inspect"
},
{
"site-package": "tomli"
Copy link
Contributor

@cclauss cclauss Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tomli should be used only on Python < 3.11 because in Python >= 3.11 tomllib is in the Standard Library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow pyre to read configuration from pyproject.toml
4 participants