project-includes is incorrectly treated as overlapping with project-excludes
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
From discord. User is on windows
Terminal
```
❯ uv run pyrefly dump-config
INFO Checking project configured at `C:\Users\raven\dev\github\privatebin\pyproject.toml`
WARN Skipping include pattern `C:\Users\raven\dev\github\privatebin\src\**\*.py` because it is matched by `project-excludes` or an ignore file.
`project-excludes`: [**/node_modules, **/__pycache__, **/venv/**/*, C:\Users\raven\AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\DLLs, C:\Users\raven\AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none, C:\Users\raven\dev\github\privatebin\.venv, C:\Users\raven\dev\github\privatebin\.venv\Lib\site-packages], ignore files [C:\Users\raven\dev\github\privatebin\.gitignore, C:\Users\raven\dev\github\privatebin\.git/info/exclude]
No Python files matched pattern `C:\Users\raven\dev\github\privatebin\src\**\*.py
```
pyproject.toml
```
[tool.pyrefly]
preset = "strict"
project-includes = ["src/**/*.py"]
[tool.pyrefly.errors]
# 3.10 doesn't have the @override decorator
missing-override-decorator = false
```
removing the project-includes configuration yields
```
INFO Checking project configured at `C:\Users\raven\dev\github\privatebin\pyproject.toml`
Configuration at `C:\Users\raven\dev\github\privatebin\pyproject.toml`
Using interpreter: C:\Users\raven\dev\github\privatebin\.venv\Scripts\python.exe
Covered files:
C:\Users\raven\dev\github\privatebin\src\privatebin\__init__.py
C:\Users\raven\dev\github\privatebin\src\privatebin\__main__.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_cli\__init__.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_cli\_create.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_cli\_delete.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_cli\_get.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_core.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_crypto.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_enums.py
C:\Users\raven\dev\github\privatebin\src\privatebin\_errors.py
...and 16 more
Resolving imports from:
Import root (inferred from project layout): "C:\\Users\\raven\\dev\\github\\privatebin\\src"
Site package path queried from interpreter: ["C:\\Users\\raven\\AppData\\Roaming\\uv\\python\\cpython-3.14-windows-x86_64-none\\DLLs", "C:\\Users\\raven\\AppData\\Roaming\\uv\\python\\cpython-3.14-windows-x86_64-none", "C:\\Users\\raven\\dev\\github\\privatebin\\.venv", "C:\\Users\\raven\\dev\\github\\privatebin\\.venv\\Lib\\site-packages", "C:\\Users\\raven\\dev\\github\\privatebin\\src"]
```
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Research direction
Reproduce the Windows configuration from pyproject.toml with `pyrefly dump-config`, first comparing behavior with and without `project-includes = ["src/**/*.py"]`. Trace the handling of project-includes and project-excludes, then verify that the command reports the Python files under src as covered instead of skipping the include pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100