Skip to content

[ty] Fix incorrect type of src.root in documentation#18040

Merged
MichaReiser merged 1 commit intomainfrom
micha/src-root-not-a-list
May 12, 2025
Merged

[ty] Fix incorrect type of src.root in documentation#18040
MichaReiser merged 1 commit intomainfrom
micha/src-root-not-a-list

Conversation

@MichaReiser
Copy link
Member

Summary

src.root is a single path. We do have plans to change the setting to a list (need to think about if we should allow empty lists) astral-sh/ty#179 but we can change that later.

Test Plan

See updated docs

@MichaReiser MichaReiser added documentation Improvements or additions to documentation docstring Related to docstring linting or formatting ty Multi-file analysis & type inference and removed docstring Related to docstring linting or formatting labels May 12, 2025
@MichaReiser MichaReiser enabled auto-merge (squash) May 12, 2025 12:26
The root(s) of the project, used for finding first-party modules.
The root of the project, used for finding first-party modules.

**Default value**: `[".", "./src"]`
Copy link
Member

@AlexWaygood AlexWaygood May 12, 2025

Choose a reason for hiding this comment

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

Hmm, it's weird that we default to multiple values if users can't set it to multiple values

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it is. Not sure how to fix.

Copy link
Member

@AlexWaygood AlexWaygood May 12, 2025

Choose a reason for hiding this comment

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

Maybe instead of referring to a default value, we could say something like

Suggested change
**Default value**: `[".", "./src"]`
**If not set, two first-party roots are inferred by default: `"."` and `"./src"`**

?

@MichaReiser MichaReiser merged commit be6ec61 into main May 12, 2025
30 checks passed
@MichaReiser MichaReiser deleted the micha/src-root-not-a-list branch May 12, 2025 12:28
@github-actions
Copy link
Contributor

mypy_primer results

No ecosystem changes detected ✅

dcreager added a commit that referenced this pull request May 12, 2025
* main:
  disable jemalloc on android (#18033)
  [ty] Fix incorrect type of `src.root` in documentation (#18040)
  [ty] Refine message for why a rule is enabled (#18038)
  [ty] Remove brackets around option names (#18037)
  Update pre-commit dependencies (#18025)
  Update docker/build-push-action action to v6.16.0 (#18030)
  Update docker/login-action action to v3.4.0 (#18031)
  Update taiki-e/install-action digest to 83254c5 (#18022)
  Update cargo-bins/cargo-binstall action to v1.12.4 (#18023)
  Update Rust crate ctrlc to v3.4.7 (#18027)
  Update Rust crate clap to v4.5.38 (#18026)
  Update Rust crate jiff to v0.2.13 (#18029)
  Update Rust crate getrandom to v0.3.3 (#18028)
  Update dependency ruff to v0.11.9 (#18024)
  [`pylint`] add fix safety section (`PLW1514`) (#17932)
  python_stdlib: update for 3.14 (#18014)
  [`ruff`] add fix safety section (`RUF033`) (#17760)
  [`pylint`] add fix safety section (`PLC0414`) (#17802)
Glyphack pushed a commit to Glyphack/ruff that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants