Skip to content

Add project-root PythonTA config discovery - #28

Merged
david-yz-liu merged 4 commits into
pyta-uoft:mainfrom
PraneethS42:feature/config-option
Oct 18, 2026
Merged

david-yz-liu merged 4 commits into
pyta-uoft:mainfrom
PraneethS42:feature/config-option

Conversation

@PraneethS42

@PraneethS42 PraneethS42 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

This PR adds a new python-ta.useProjectRootConfig boolean setting, which is enabled by default.

When it is enabled, the extension searches the workspace root for .pylintrc, pylintrc, or pyproject.toml, following PythonTA’s existing priority order. Any discovered file is passed to PythonTA as its configuration. While enabled, the existing python-ta.configPath setting is ignored.

Adds 3 tests to verify this behaviour, along with README/Changelog updates.

Screenshots of your changes (if applicable)

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
✨ New feature (non-breaking change that adds functionality) x
🐛 Bug fix (non-breaking change that fixes an issue)
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
📖 Documentation update (change that updates documentation)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.
  • I have updated the project Changelog (this is required for all changes).

After opening your pull request:

  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

(Include any questions or comments you have regarding your changes.)

@coveralls

coveralls commented Oct 14, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 39093891568

Coverage increased (+0.5%) to 51.704%

Details

  • Coverage increased (+0.5%) from the base build.
  • Patch coverage: 2 uncovered changes across 2 files (15 of 17 lines covered, 88.24%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
bundled/tool/lsp_server.py 13 12 92.31%
src/common/settings.ts 4 3 75.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1309
Covered Lines: 665
Line Coverage: 50.8%
Relevant Branches: 70
Covered Branches: 48
Branch Coverage: 68.57%
Branches in Coverage %: Yes
Coverage Strength: 0.77 hits per line

💛 - Coveralls

@PraneethS42 PraneethS42 changed the title Added config file logic Add project-root PythonTA config discovery Oct 14, 2026

@david-yz-liu david-yz-liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@PraneethS42 the functionality is good, but in terms of the Settings UI (open the settings window and search "PythonTA") I think there could be some improvement.

First, please ensure the new option is immediately above the existing "Config Path" option.

Second, if the new option is checked, is there a way to disable to "Config Path" option? I feel like there is in VS Code settings.

@PraneethS42

PraneethS42 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Implemented Changes:

  1. Made the default true for the option, as per request
  2. Moved the setting above the existing Config Path option. Checked this manually:
configpath

I couldn't find a way to disable the config path setting, but as you know, when this new setting is enabled, Config Path gets ignored, so it works functionally. It seems VS Code does not support conditional when or enablement rules, so an extension cannot dynamically grey out another native setting. I found this info from a denied VS Code feature request: microsoft/vscode#167843.

@david-yz-liu david-yz-liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thanks for the updates @PraneethS42!

@david-yz-liu
david-yz-liu merged commit 1871fae into pyta-uoft:main Oct 18, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

3 participants