Developer
Danny Yang
yangdanny@meta.com
Performance
YoY:+660%Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files |
|---|
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.
| Effort |
|---|
| 99afb7b2 | This commit **refactors** the handling of **module-level ignore directives** (`ignore_all`) within the `pyrefly` linter's **error collection and suppression logic**. It moves the `ignore_all` computation from the `Ignore` struct's initialization to a later stage in `get_errors`/`get_all_errors`, where AST-derived multi-line string ranges are available. This **pure refactoring** extracts `parse_ignore_all` as a standalone function and introduces a new `ModuleRanges` struct to bundle these directives and ranges. The `ignore_all` state is now threaded through the error collection pipeline, ensuring `UnusedIgnore` errors are exempt from suppression. This change enables future improvements to directive recognition, such as after module docstrings, without altering current behavior or duplicating string-tracking logic. | Mar 31 | 4 | maint |
| 08a6ae58 | This commit **fixes a bug** in **PyreFly's error suppression mechanism** by adding robust support for **backslash continuation comments**. Previously, suppression comments were not correctly applied to code using backslash continuations, especially when placed after the `\` or between lines. New logic in `pyrefly/lib/state/errors.rs` (e.g., `sorted_backslash_continuation_ranges`) now accurately identifies these blocks, and `pyrefly/lib/state/state.rs` integrates these ranges into the overall multi-line processing. The **error suppression logic** in `pyrefly/lib/error/suppress.rs` (`add_suppressions`) is enhanced to correctly remap errors and apply suppressions, ensuring a comment above the first line covers the entire continued expression. This **bug fix** significantly improves the reliability and usability of error suppression for Python code utilizing backslash continuations, addressing issue #2935. | Mar 31 | 4 | grow |
| 1f2a15a5 | This commit **enhances Pyrefly's ignore directive parsing** by allowing `# pyrefly: ignore-errors` directives to be placed after a module docstring. It modifies the `parse_ignore_all` function in `crates/pyrefly_python/src/ignore.rs` to correctly skip over docstrings when scanning for top-level ignores, leveraging recently added multi-line string range information. This **feature enhancement relaxes placement requirements** for these directives, addressing a specific user request for increased flexibility in code suppression. New test cases in `pyrefly/lib/test/suppression.rs` validate this behavior, ensuring that only explicit `ignore-errors` are recognized in this position, not ambiguous bare `# type: ignore`. | Mar 31 | 2 | grow |
| 4e1e19bd | This commit implements a **bug fix** and **validation improvement** within the `pyrefly` type checker, specifically addressing the use of `Self` return annotations. It now **rejects `Self` as a return type** when the `self` parameter of a method is explicitly annotated with a `TypeVar`, as this constitutes an invalid semantic usage. This change impacts the **function validation logic** in `pyrefly/lib/alt/function.rs` and extends the **core type system** in `crates/pyrefly_types/src/types.rs` with a new `is_explicit_type_variable` method. The update introduces a **new type-checking error** for previously accepted, but semantically incorrect, code, thereby enhancing the robustness and correctness of type inference. | Mar 31 | 6 | waste |
| d2b77c46 | This commit **fixes a bug in the type binding logic** that incorrectly allowed `ParamSpec` components like `P.args` and `P.kwargs` to be resolved even when the `ParamSpec` `P` was not properly defined or in scope. The **`pyrefly/lib/binding` module** now includes `try_intercept_lookup` and modifies `Expr::Attribute` binding to ensure `P.args` and `P.kwargs` are only recognized if `P` is an existing `ParamSpec` type parameter, preventing its implicit introduction. This **improves the accuracy of `ParamSpec` resolution** and provides more precise error messages for incorrect usage. Conformance tests and `ParamSpec` unit tests have been updated to reflect this corrected behavior and clearer error reporting. | Mar 30 | 6 | waste |
| 11683fbe | This commit **implements core assignability rules and corrects the behavior of `TypeForm`** within the **PyRefly type system**, specifically addressing aspects of **PEP 747**. It updates the `pyrefly/lib/alt/specials.rs` module to ensure `TypeForm[T]` correctly produces the `Type::TypeForm(T)` variant and modifies `pyrefly/lib/alt/solve.rs` to interpret bare `TypeForm` as `TypeForm[Any]`. Furthermore, the `pyrefly/lib/solver/subset.rs` module now includes comprehensive assignability rules for `TypeForm`, covering covariance and its interactions with `type`, `ClassDef`, and `Annotated` types, significantly enhancing type checking accuracy. This **feature implementation** also includes new tests and updates to conformance expectations to reflect these changes. | Mar 30 | 7 | grow |
| ff7e75a3 | This commit **enhances the `pyrefly` type solver** by introducing a new rule within the `is_subset_eq` function to ensure the class representation of `Any` is compatible with all `TypeForm` instances. This **new capability** improves the type system's flexibility and correctness, allowing `Any` to be properly recognized in various type comparisons. The change is validated by **new test cases** added to `pyrefly/lib/test/typeform.rs` that specifically verify `Any`'s recognition as a `TypeForm`. This update has a positive downstream impact, as reflected by a **reduction in reported differences and failures** in the `conformance/third_party/results.json` results, leading to more accurate type checking and inference within the `pyrefly` system. | Mar 30 | 5 | maint |
| 3c85bc7b | This commit introduces a **new type rule** and a **critical bug fix** to enhance the `pyrefly` type checker's handling of `TypeForm` types. It **implements a new subset rule** in `pyrefly/lib/solver/subset.rs` that allows `None` to be considered a valid `TypeForm[T]` when `None` is a subset of `T`, improving the expressiveness of type definitions. Concurrently, a **bug in type promotion** within `pyrefly/lib/alt/solve.rs` is addressed, ensuring that `TypeForm[T]` remains unwrapped in annotation positions to prevent incorrect assignment checking. These changes collectively refine the **type form semantics** and **type solving logic**, leading to more accurate and robust type inference and conformance. | Mar 30 | 6 | waste |
| c82cb4ab | This commit introduces the `Type::TypeForm` variant to the core `Type` enum within the **`pyrefly_types` crate**, representing `TypeForm[T]` values as part of **PEP 747 support**. This **new capability** involves adding a `mk_typeform` helper, updating `Display` formatting, and extending `Visit`/`VisitMut` implementations to handle the inner type. It also updates **type resolution** in `attr.rs` and **type conversion** in `convert.rs` to recognize the new variant. However, this variant is currently only defined and not yet fully utilized in annotation processing, as `apply_special_form` will still produce `Type::Type` until assignability rules are implemented. | Mar 30 | 5 | grow |
| 7e35f735 | This commit introduces the **`TypeForm` special form** to the type system, a foundational step towards implementing PEP 747. It **adds `TypeForm` to the `SpecialForm` enum** within the `pyrefly_types` crate and integrates its recognition and processing logic into the `apply_special_form` function in `pyrefly/lib/alt/specials.rs`. This **new capability** allows the system to correctly parse and handle `type[T]` constructs, expanding the expressiveness of type annotations. Extensive **conformance and unit tests** have been updated and added to validate its behavior and error handling, ensuring proper recognition and error reporting for incorrect specializations. | Mar 30 | 8 | maint |
| 368b1fe5 | This commit **fixes a conformance issue** in the **type checker** by **rejecting `ClassVar[Final]` annotations in non-dataclass classes**, aligning with the Python typing specification. Previously, this invalid type combination was silently accepted, while `Final[ClassVar]` was already correctly flagged. The change introduces a new check within the `calculate_class_field` function in the **`pyrefly` type analysis module**, ensuring that this error is now reported for regular classes but remains permitted for dataclasses, which explicitly allow it. This improves the **accuracy of type analysis** and is accompanied by updated conformance tests and new unit tests for both `ClassVar[Final]` and `Final[ClassVar]` scenarios. | Mar 30 | 5 | maint |
| c36a5a7a | This commit **refactors** the **`pyrefly` library** by **renaming** an internal function responsible for tracking multi-line string positions. The function `sorted_multi_line_fstring_ranges` in `pyrefly/lib/state/errors.rs` was inaccurately named, as it handles all multi-line string types, not solely f-strings. It has been renamed to `sorted_multi_line_string_ranges` to accurately reflect its broader scope and improve code clarity. This **internal refactoring** updates all references within `pyrefly/lib/error/suppress.rs` and `pyrefly/lib/state/state.rs`, along with its documentation. The change has **no functional impact** on existing suppression logic or user-facing behavior. | Mar 28 | 3 | maint |
| 1f90e50a | This commit delivers a **bug fix** to resolve a **false positive for `__slots__` validation** within the **`pyrefly` static analyzer**. It specifically corrects an issue where attributes defined on a **metaclass** were erroneously flagged, failing to recognize them as valid data descriptors. The fix involves modifying the **attribute lookup logic** in `pyrefly/lib/alt/attr.rs`, particularly the `get_class_attribute` function, and introducing a new `is_data_descriptor` method in `pyrefly/lib/alt/class/class_field.rs` to accurately identify these attributes. This enhancement ensures `pyrefly`'s static analysis correctly handles `__slots__` in conjunction with metaclasses, aligning its behavior with `mypy` and preventing incorrect error reporting. New test cases have been added to `pyrefly/lib/test/slots.rs` to verify this corrected behavior. | Mar 28 | 3 | waste |
| 439d6450 | This commit **refactors** the `scripts/benchmark/typecheck_benchmark.py` script to enhance its type checking configuration and clean up obsolete code. It **adds `check_untyped_defs = True`** to the generated `mypy` configuration, which will enforce stricter type checking for untyped definitions during benchmark runs. Concurrently, the **unused `_write_dummy_zuban_config` function is removed**, streamlining the codebase and improving maintainability. This change primarily impacts the **typechecking benchmark subsystem**, leading to more robust type analysis and a cleaner script. | Mar 27 | 1 | maint |
| 6909fde4 | This commit **fixes a bug** in the **type checker's match narrowing** logic, specifically addressing how **irrefutable keyword patterns** in class patterns (e.g., `B(x=_)`) are processed. Previously, these patterns incorrectly prevented **negative narrowing**, hindering the type checker's ability to eliminate the class type in subsequent `case` branches. The fix modifies `bind_pattern` in `pyrefly/lib/binding/pattern.rs` to skip `Placeholder` insertion and introduces a `strip_placeholders` method in `pyrefly/lib/binding/narrow.rs` to remove extraneous `Placeholder` operations. This ensures that the **type checker** can accurately perform **negative narrowing** for such patterns, significantly improving the **correctness** and **precision** of control flow analysis for `match` statements. | Mar 27 | 3 | waste |
| e5674678 | This commit delivers a **bug fix** for **pyrefly**'s **type canonicalization logic**, resolving a **false positive error** when using `isinstance` with union types like `type | T`. Previously, the `type` metatype was incorrectly double-wrapped as `Type::Type(Type::Type(Any))` within unions, causing `unwrap_class_object_silently` to fail. The fix, implemented in the `as_class_info` function within `pyrefly/lib/alt/class/classdef.rs`, now prevents this double-wrapping for union members that are already `Type::Type(...)`. This significantly improves the accuracy of **type checking** for `isinstance` and `issubclass` expressions, ensuring correct behavior for complex type annotations. | Mar 27 | 2 | waste |
| cbb8f75d | This commit **enhances the automated issue labeling system** by adding new keywords to the `.github/workflows/label_new_issues.yml` workflow. It introduces terms like 'basemodel', 'hover', 'editor', 'lspconfig', 'completion', 'highlight', and 'semantic' to improve the accuracy of issue categorization. This **maintenance** update ensures that issues containing these terms are now automatically assigned the **`pydantic`** and **`language-server`** labels. The change streamlines issue triage by leveraging insights from past issue data, making the development workflow more efficient. | Mar 26 | 1 | maint |
| 541b1464 | This commit **enhances** the **size labeler workflow** by introducing a crucial step to **remove existing size labels** from a pull request before applying new ones. This **maintenance improvement** ensures that if a pull request's size changes, any previously assigned size labels are cleared, preventing the accumulation of multiple or outdated labels. Affecting the automated labeling system, specifically the `.github/workflows/size_labeler.yml` configuration, this change guarantees that pull requests always display the most current and accurate size classification. The primary impact is improved **accuracy and cleanliness** of pull request metadata, making it easier to track changes in PR size. | Mar 26 | 1 | grow |
| 68ad7d79 | This commit **adds license metadata to the `pyrefly` project's packaging configuration**, addressing a **bug fix** identified in issue #2909. It specifically **updates the `pyproject.toml` file** to declare the project's license, ensuring proper distribution information. Additionally, this **maintenance** task ensures the `pyrefly/LICENSE` file is correctly set as a symbolic link to the main license file. This change improves the **packaging and distribution of the `pyrefly` library**, making its license information readily available and correctly specified for downstream users and tools. | Mar 26 | 2 | maint |
| b2fd8a63 | This commit introduces a **new capability** to the **`pyrefly suppress` command**, allowing users to configure the placement of suppression comments. A new `--comment-location` flag enables choosing between placing comments on the line before or as trailing comments on the same line as the error. This **feature** modifies the core **error suppression logic** within `pyrefly/lib/error/suppress.rs`, specifically affecting functions like `add_suppressions` and `suppress_errors`, and extends string literal handling in `pyrefly/lib/state/errors.rs` via `sorted_multi_line_fstring_ranges`. The default behavior for `pyrefly suppress` remains unchanged, and `pyrefly check --suppress-errors` explicitly retains its existing comment placement. | Mar 26 | 4 | grow |
This commit **refactors** the handling of **module-level ignore directives** (`ignore_all`) within the `pyrefly` linter's **error collection and suppression logic**. It moves the `ignore_all` computation from the `Ignore` struct's initialization to a later stage in `get_errors`/`get_all_errors`, where AST-derived multi-line string ranges are available. This **pure refactoring** extracts `parse_ignore_all` as a standalone function and introduces a new `ModuleRanges` struct to bundle these directives and ranges. The `ignore_all` state is now threaded through the error collection pipeline, ensuring `UnusedIgnore` errors are exempt from suppression. This change enables future improvements to directive recognition, such as after module docstrings, without altering current behavior or duplicating string-tracking logic.
This commit **fixes a bug** in **PyreFly's error suppression mechanism** by adding robust support for **backslash continuation comments**. Previously, suppression comments were not correctly applied to code using backslash continuations, especially when placed after the `\` or between lines. New logic in `pyrefly/lib/state/errors.rs` (e.g., `sorted_backslash_continuation_ranges`) now accurately identifies these blocks, and `pyrefly/lib/state/state.rs` integrates these ranges into the overall multi-line processing. The **error suppression logic** in `pyrefly/lib/error/suppress.rs` (`add_suppressions`) is enhanced to correctly remap errors and apply suppressions, ensuring a comment above the first line covers the entire continued expression. This **bug fix** significantly improves the reliability and usability of error suppression for Python code utilizing backslash continuations, addressing issue #2935.
This commit **enhances Pyrefly's ignore directive parsing** by allowing `# pyrefly: ignore-errors` directives to be placed after a module docstring. It modifies the `parse_ignore_all` function in `crates/pyrefly_python/src/ignore.rs` to correctly skip over docstrings when scanning for top-level ignores, leveraging recently added multi-line string range information. This **feature enhancement relaxes placement requirements** for these directives, addressing a specific user request for increased flexibility in code suppression. New test cases in `pyrefly/lib/test/suppression.rs` validate this behavior, ensuring that only explicit `ignore-errors` are recognized in this position, not ambiguous bare `# type: ignore`.
This commit implements a **bug fix** and **validation improvement** within the `pyrefly` type checker, specifically addressing the use of `Self` return annotations. It now **rejects `Self` as a return type** when the `self` parameter of a method is explicitly annotated with a `TypeVar`, as this constitutes an invalid semantic usage. This change impacts the **function validation logic** in `pyrefly/lib/alt/function.rs` and extends the **core type system** in `crates/pyrefly_types/src/types.rs` with a new `is_explicit_type_variable` method. The update introduces a **new type-checking error** for previously accepted, but semantically incorrect, code, thereby enhancing the robustness and correctness of type inference.
This commit **fixes a bug in the type binding logic** that incorrectly allowed `ParamSpec` components like `P.args` and `P.kwargs` to be resolved even when the `ParamSpec` `P` was not properly defined or in scope. The **`pyrefly/lib/binding` module** now includes `try_intercept_lookup` and modifies `Expr::Attribute` binding to ensure `P.args` and `P.kwargs` are only recognized if `P` is an existing `ParamSpec` type parameter, preventing its implicit introduction. This **improves the accuracy of `ParamSpec` resolution** and provides more precise error messages for incorrect usage. Conformance tests and `ParamSpec` unit tests have been updated to reflect this corrected behavior and clearer error reporting.
This commit **implements core assignability rules and corrects the behavior of `TypeForm`** within the **PyRefly type system**, specifically addressing aspects of **PEP 747**. It updates the `pyrefly/lib/alt/specials.rs` module to ensure `TypeForm[T]` correctly produces the `Type::TypeForm(T)` variant and modifies `pyrefly/lib/alt/solve.rs` to interpret bare `TypeForm` as `TypeForm[Any]`. Furthermore, the `pyrefly/lib/solver/subset.rs` module now includes comprehensive assignability rules for `TypeForm`, covering covariance and its interactions with `type`, `ClassDef`, and `Annotated` types, significantly enhancing type checking accuracy. This **feature implementation** also includes new tests and updates to conformance expectations to reflect these changes.
This commit **enhances the `pyrefly` type solver** by introducing a new rule within the `is_subset_eq` function to ensure the class representation of `Any` is compatible with all `TypeForm` instances. This **new capability** improves the type system's flexibility and correctness, allowing `Any` to be properly recognized in various type comparisons. The change is validated by **new test cases** added to `pyrefly/lib/test/typeform.rs` that specifically verify `Any`'s recognition as a `TypeForm`. This update has a positive downstream impact, as reflected by a **reduction in reported differences and failures** in the `conformance/third_party/results.json` results, leading to more accurate type checking and inference within the `pyrefly` system.
This commit introduces a **new type rule** and a **critical bug fix** to enhance the `pyrefly` type checker's handling of `TypeForm` types. It **implements a new subset rule** in `pyrefly/lib/solver/subset.rs` that allows `None` to be considered a valid `TypeForm[T]` when `None` is a subset of `T`, improving the expressiveness of type definitions. Concurrently, a **bug in type promotion** within `pyrefly/lib/alt/solve.rs` is addressed, ensuring that `TypeForm[T]` remains unwrapped in annotation positions to prevent incorrect assignment checking. These changes collectively refine the **type form semantics** and **type solving logic**, leading to more accurate and robust type inference and conformance.
This commit introduces the `Type::TypeForm` variant to the core `Type` enum within the **`pyrefly_types` crate**, representing `TypeForm[T]` values as part of **PEP 747 support**. This **new capability** involves adding a `mk_typeform` helper, updating `Display` formatting, and extending `Visit`/`VisitMut` implementations to handle the inner type. It also updates **type resolution** in `attr.rs` and **type conversion** in `convert.rs` to recognize the new variant. However, this variant is currently only defined and not yet fully utilized in annotation processing, as `apply_special_form` will still produce `Type::Type` until assignability rules are implemented.
This commit introduces the **`TypeForm` special form** to the type system, a foundational step towards implementing PEP 747. It **adds `TypeForm` to the `SpecialForm` enum** within the `pyrefly_types` crate and integrates its recognition and processing logic into the `apply_special_form` function in `pyrefly/lib/alt/specials.rs`. This **new capability** allows the system to correctly parse and handle `type[T]` constructs, expanding the expressiveness of type annotations. Extensive **conformance and unit tests** have been updated and added to validate its behavior and error handling, ensuring proper recognition and error reporting for incorrect specializations.
This commit **fixes a conformance issue** in the **type checker** by **rejecting `ClassVar[Final]` annotations in non-dataclass classes**, aligning with the Python typing specification. Previously, this invalid type combination was silently accepted, while `Final[ClassVar]` was already correctly flagged. The change introduces a new check within the `calculate_class_field` function in the **`pyrefly` type analysis module**, ensuring that this error is now reported for regular classes but remains permitted for dataclasses, which explicitly allow it. This improves the **accuracy of type analysis** and is accompanied by updated conformance tests and new unit tests for both `ClassVar[Final]` and `Final[ClassVar]` scenarios.
This commit **refactors** the **`pyrefly` library** by **renaming** an internal function responsible for tracking multi-line string positions. The function `sorted_multi_line_fstring_ranges` in `pyrefly/lib/state/errors.rs` was inaccurately named, as it handles all multi-line string types, not solely f-strings. It has been renamed to `sorted_multi_line_string_ranges` to accurately reflect its broader scope and improve code clarity. This **internal refactoring** updates all references within `pyrefly/lib/error/suppress.rs` and `pyrefly/lib/state/state.rs`, along with its documentation. The change has **no functional impact** on existing suppression logic or user-facing behavior.
This commit delivers a **bug fix** to resolve a **false positive for `__slots__` validation** within the **`pyrefly` static analyzer**. It specifically corrects an issue where attributes defined on a **metaclass** were erroneously flagged, failing to recognize them as valid data descriptors. The fix involves modifying the **attribute lookup logic** in `pyrefly/lib/alt/attr.rs`, particularly the `get_class_attribute` function, and introducing a new `is_data_descriptor` method in `pyrefly/lib/alt/class/class_field.rs` to accurately identify these attributes. This enhancement ensures `pyrefly`'s static analysis correctly handles `__slots__` in conjunction with metaclasses, aligning its behavior with `mypy` and preventing incorrect error reporting. New test cases have been added to `pyrefly/lib/test/slots.rs` to verify this corrected behavior.
This commit **refactors** the `scripts/benchmark/typecheck_benchmark.py` script to enhance its type checking configuration and clean up obsolete code. It **adds `check_untyped_defs = True`** to the generated `mypy` configuration, which will enforce stricter type checking for untyped definitions during benchmark runs. Concurrently, the **unused `_write_dummy_zuban_config` function is removed**, streamlining the codebase and improving maintainability. This change primarily impacts the **typechecking benchmark subsystem**, leading to more robust type analysis and a cleaner script.
This commit **fixes a bug** in the **type checker's match narrowing** logic, specifically addressing how **irrefutable keyword patterns** in class patterns (e.g., `B(x=_)`) are processed. Previously, these patterns incorrectly prevented **negative narrowing**, hindering the type checker's ability to eliminate the class type in subsequent `case` branches. The fix modifies `bind_pattern` in `pyrefly/lib/binding/pattern.rs` to skip `Placeholder` insertion and introduces a `strip_placeholders` method in `pyrefly/lib/binding/narrow.rs` to remove extraneous `Placeholder` operations. This ensures that the **type checker** can accurately perform **negative narrowing** for such patterns, significantly improving the **correctness** and **precision** of control flow analysis for `match` statements.
This commit delivers a **bug fix** for **pyrefly**'s **type canonicalization logic**, resolving a **false positive error** when using `isinstance` with union types like `type | T`. Previously, the `type` metatype was incorrectly double-wrapped as `Type::Type(Type::Type(Any))` within unions, causing `unwrap_class_object_silently` to fail. The fix, implemented in the `as_class_info` function within `pyrefly/lib/alt/class/classdef.rs`, now prevents this double-wrapping for union members that are already `Type::Type(...)`. This significantly improves the accuracy of **type checking** for `isinstance` and `issubclass` expressions, ensuring correct behavior for complex type annotations.
This commit **enhances the automated issue labeling system** by adding new keywords to the `.github/workflows/label_new_issues.yml` workflow. It introduces terms like 'basemodel', 'hover', 'editor', 'lspconfig', 'completion', 'highlight', and 'semantic' to improve the accuracy of issue categorization. This **maintenance** update ensures that issues containing these terms are now automatically assigned the **`pydantic`** and **`language-server`** labels. The change streamlines issue triage by leveraging insights from past issue data, making the development workflow more efficient.
This commit **enhances** the **size labeler workflow** by introducing a crucial step to **remove existing size labels** from a pull request before applying new ones. This **maintenance improvement** ensures that if a pull request's size changes, any previously assigned size labels are cleared, preventing the accumulation of multiple or outdated labels. Affecting the automated labeling system, specifically the `.github/workflows/size_labeler.yml` configuration, this change guarantees that pull requests always display the most current and accurate size classification. The primary impact is improved **accuracy and cleanliness** of pull request metadata, making it easier to track changes in PR size.
This commit **adds license metadata to the `pyrefly` project's packaging configuration**, addressing a **bug fix** identified in issue #2909. It specifically **updates the `pyproject.toml` file** to declare the project's license, ensuring proper distribution information. Additionally, this **maintenance** task ensures the `pyrefly/LICENSE` file is correctly set as a symbolic link to the main license file. This change improves the **packaging and distribution of the `pyrefly` library**, making its license information readily available and correctly specified for downstream users and tools.
This commit introduces a **new capability** to the **`pyrefly suppress` command**, allowing users to configure the placement of suppression comments. A new `--comment-location` flag enables choosing between placing comments on the line before or as trailing comments on the same line as the error. This **feature** modifies the core **error suppression logic** within `pyrefly/lib/error/suppress.rs`, specifically affecting functions like `add_suppressions` and `suppress_errors`, and extends string literal handling in `pyrefly/lib/state/errors.rs` via `sorted_multi_line_fstring_ranges`. The default behavior for `pyrefly suppress` remains unchanged, and `pyrefly check --suppress-errors` explicitly retains its existing comment placement.