Commit Graph

  • c42a1587b4
    Fixed a bug that results in a false positive error when assigning a TypeGuard[T] or TypeIs[T] to a supertype of bool (like int). This addresses #8769. (#8771) main Eric Traut 2024-08-16 00:06:36 -0700
  • bc86bd3f26 Fixed a bug that results in a false positive error when assigning a TypeGuard[T] or TypeIs[T] to a supertype of bool (like int). This addresses #8769. Eric Traut 2024-08-15 23:57:11 -0700
  • 45f4925a66
    Merge a856c26dd0 into ea55470da5 dependabot[bot] 2024-08-16 01:23:21 -0300
  • ea55470da5
    Fixed bug that results in a crash under certain circumstances when a ParamSpec without a scope is used illegally to specialize a class. This addresses #8757. (#8768) Eric Traut 2024-08-15 20:07:42 -0600
  • 8067c7c16f Fixed bug that results in a crash under certain circumstances when a ParamSpec without a scope is used illegally to specialize a class. This addresses #8757. Eric Traut 2024-08-15 18:59:53 -0700
  • deaf2641cf Refactored binary operator code for readability. No functional change. Eric Traut 2024-08-13 22:46:55 -0600
  • 3a99a9cd67 Updated some out-of-date information in the documentation. Eric Traut 2024-08-13 21:59:31 -0600
  • a856c26dd0
    Bump axios from 1.6.1 to 1.7.4 dependabot/npm_and_yarn/axios-1.7.4 dependabot[bot] 2024-08-13 23:58:29 +0000
  • 7fd5ed20be Published 1.1.376 1.1.376 Eric Traut 2024-08-13 17:56:41 -0600
  • 75dfc6bbf9
    Fixed bug that results in a confusing type in an error message when isinstance type narrowing between a type and another type creates a subclass. (#8753) Eric Traut 2024-08-13 09:33:21 -0600
  • 2635da0306
    Merge branch 'main' into subclass subclass Eric Traut 2024-08-13 09:32:54 -0600
  • 796a483119
    Fixed bug that leads to a hang under certain circumstances involving deeply-nested higher-order functions. This addresses #8723. (#8752) Eric Traut 2024-08-13 09:21:14 -0600
  • a2718f7662 Fixed bug that leads to a hang under certain circumstances involving deeply-nested higher-order functions. This addresses #8723. Eric Traut 2024-08-13 09:10:41 -0600
  • c9a4eb2252
    Changed behavior for protocols that have methods with method-scoped type variables. These are no longer treated as free type variables during protocol matching, so they can be used to support rank-2 polymorphism. This behavior is not currently dictated by the typing spec, but it is more consistent with mypy. This addresses #8685. (#8751) Eric Traut 2024-08-12 23:55:05 -0600
  • fb54156b0b Changed behavior for protocols that have methods with method-scoped type variables. These are no longer treated as free type variables during protocol matching, so they can be used to support rank-2 polymorphism. This behavior is not currently dictated by the typing spec, but it is more consistent with mypy. This addresses #8685. Eric Traut 2024-08-12 23:45:09 -0600
  • cef8bbb903
    Fixed bug that leads to false positive error when a protocol has a read-only property a class has a Final variable. This addresses #8744. (#8747) Eric Traut 2024-08-11 19:50:02 -0600
  • bbaa353de1 Fixed bug that leads to false positive error when a protocol has a read-only property a class has a Final variable. This addresses #8744. Eric Traut 2024-08-11 19:04:55 -0600
  • f8c38e5a9b Fixed bug that leads to false positive error when a protocol has a read-only property a class has a Final variable. This addresses #8744. Eric Traut 2024-08-11 19:04:55 -0600
  • 54dec0c4d5 Fixed bug that leads to false positive error when a protocol has a read-only property a class has a Final variable. This addresses part of #8744. Eric Traut 2024-08-11 19:04:55 -0600
  • aff4bfbfa3 Did some code cleanup with unpacked tuples and TypeVarTuples. Eric Traut 2024-08-11 00:38:15 -0600
  • 2c9c42481f Removed vestigial code in Union type arg logic. Eric Traut 2024-08-10 23:05:27 -0600
  • fe3eca368a
    Fixed bug that results in a confusing type in an error message when isinstance type narrowing between a type and another type creates a subclass. (#8741) Eric Traut 2024-08-10 18:32:46 -0600
  • 142daa0a07
    Removed some unnecessary special casing of None in type guard logic. (#8740) Eric Traut 2024-08-10 18:23:59 -0600
  • 1a89f03427 Removed some unnecessary special casing of None in type guard logic. Eric Traut 2024-08-10 18:15:32 -0600
  • 62906ff899 Fixed bug that results in a confusing type in an error message when isinstance type narrowing between a type and another type creates a subclass. Eric Traut 2024-08-10 18:04:54 -0600
  • 64824f9d8b Partial solution for 8691 Eric Traut 2024-08-10 18:01:38 -0600
  • f376c034ca Fixed a bug that results in incorrect type narrowing with TypeIs when result type is type[T]. This addresses #8691 and #8686. Eric Traut 2024-08-10 16:13:29 -0600
  • 3905cfb852
    Another round of simplification for callable return types. (#8737) Eric Traut 2024-08-10 13:26:07 -0600
  • 4809e4686e Another round of simplification for callable return types. Eric Traut 2024-08-10 13:18:01 -0600
  • 2b82d07f69 Added small performance optimization in checker to avoid generating a diagnostic message in cases where it won't be used. Eric Traut 2024-08-10 12:42:17 -0600
  • 913d18d960
    Renamed some internal functions for readability and added options parameter to getEffectiveReturnType function. This is in preparation for a more involved change to fix #8723. (#8736) Eric Traut 2024-08-10 12:40:29 -0600
  • ea5bd39a8c Renamed some internal functions for readability and added options parameter to getEffectiveReturnType function. This is in preparation for a more involved change to fix #8723. Eric Traut 2024-08-10 12:28:24 -0600
  • 07ca233ba7 Updated typescript compiler version from 5.2 to 5.5.4 to avoid a bug I was hitting. Eric Traut 2024-08-10 10:58:10 -0600
  • 1a17c0aa6b
    Changed synthesized comparison methods (__lt__, etc.) for dataclasses when order=True to use Self rather than an instance of the class. This is not only more consistent with other synthesized methods, but it also preserves covariance of type variables if the dataclass is frozen. (#8734) Eric Traut 2024-08-10 10:27:32 -0600
  • 61fc5c6c18 Changed synthesized comparison methods (__lt__, etc.) for dataclasses when order=True to use Self rather than an instance of the class. This is not only more consistent with other synthesized methods, but it also preserves covariance of type variables if the dataclass is frozen. Eric Traut 2024-08-10 10:19:26 -0600
  • 465b04c80b Fixed a bug in the code that detects attribute docstrings to prevent it from walking all the way to the top of the parse tree. Eric Traut 2024-08-10 09:52:18 -0600
  • 4fc5de5c1e
    Fixed a false positive error when solving type variables in a call that involves a lambda. This addresses #8714. (#8730) Eric Traut 2024-08-10 00:47:49 -0600
  • 4b5a32bc03 Fixed a false positive error when solving type variables in a call that involves a lambda. This addresses #8714. Eric Traut 2024-08-10 00:26:00 -0600
  • dc421496b5 Fixed a false positive error when solving type variables in a call that involves a lambda. This addresses #8714. Eric Traut 2024-08-10 00:26:00 -0600
  • f85e257026
    Special case pythonPath to also come from the languageServer (#8728) Rich Chiodo 2024-08-09 17:49:18 -0700
  • 447d910ccb Compare URI correctly Rich Chiodo false 2024-08-09 17:07:44 -0700
  • aa4784b6a2 Special case pythonPath to also come from the languageServer Rich Chiodo false 2024-08-09 17:02:44 -0700
  • 2aa9bf4c20
    Reapply the compiler flags change but separate out the 'language server' specific settings (#8726) Rich Chiodo 2024-08-09 16:15:38 -0700
  • a7d8aa1638
    Merge branch 'main' into rchiodo/fix_compilerflags Rich Chiodo 2024-08-09 16:04:36 -0700
  • 11a48431b6 Fix build error Rich Chiodo false 2024-08-09 16:01:22 -0700
  • d95f84fba6 Separate command line options into json ones and language server ones Rich Chiodo false 2024-08-09 15:29:50 -0700
  • 152350997d
    Enhanced argument-to-parameter matching logic to support dictionary unpacking where the dict key type is a union of literals. This addresses #8671. (#8724) Eric Traut 2024-08-09 15:30:43 -0600
  • 5a7993309d Document different types of 'compiler' flags and ensure merging of flags is consistent (#8704) Rich Chiodo 2024-08-09 10:38:33 -0700
  • 5e94ff4c7f Enhanced argument-to-parameter matching logic to support dictionary unpacking where the dict key type is a union of literals. This addresses #8671. Eric Traut 2024-08-09 15:22:14 -0600
  • de0386d690 Revert "Document different types of 'compiler' flags and ensure merging of flags is consistent (#8704)" Eric Traut 2024-08-09 13:20:55 -0600
  • 421a87fd8a
    Improved consistency of parameter name restrictions for the reportSelfClsParameterName check. Previously, different rules were applied to __new__ and class methods within metaclasses. This addresses #8717. (#8720) Eric Traut 2024-08-09 13:11:34 -0600
  • 74d25707e7 Improved consistency of parameter name restrictions for the reportSelfClsParameterName check. Previously, different rules were applied to __new__ and class methods within metaclasses. This addresses #8717. Eric Traut 2024-08-09 13:01:46 -0600
  • a86210ccb7
    Document different types of 'compiler' flags and ensure merging of flags is consistent (#8704) Rich Chiodo 2024-08-09 10:38:33 -0700
  • 7d812585f1
    Merge branch 'main' into rchiodo/document_compiler_flags Rich Chiodo 2024-08-09 10:29:11 -0700
  • b708322346 Merge branch 'rchiodo/document_compiler_flags' of https://github.com/rchiodo/pyright into rchiodo/document_compiler_flags Rich Chiodo false 2024-08-09 10:28:57 -0700
  • bf937337ad Change fromVsCodeExtension to fromLanguageServer Rich Chiodo false 2024-08-09 10:28:54 -0700
  • f68a616eb2 Fixed bug that produces signatures with extra (unnecessary) positional-only and keyword-only separators when using a TypedDict with zero fields. This addresses #8712. Eric Traut 2024-08-09 08:39:51 -0600
  • 778509b20d Cleaned up some out-of-date comments and removed a circular import. Eric Traut 2024-08-09 00:24:02 -0600
  • 55e1681568
    Fixed bug that results in a false negative reportIncompatibleMethodOverride when the child class method uses a type parameter that is scoped to the child class. This addresses #8622. (#8711) Eric Traut 2024-08-09 00:04:00 -0600
  • d3b20d6a5d Fixed bug that results in a false negative reportIncompatibleMethodOverride when the child class method uses a type parameter that is scoped to the child class. This addresses #8622. Eric Traut 2024-08-08 23:39:47 -0600
  • fd68169161 Renamed PopulateExpectedType flag and clarified its purpose. Eric Traut 2024-08-08 19:32:59 -0600
  • 77dc8848c5 Simplified internal validateArgTypes function. Eric Traut 2024-08-08 19:26:16 -0600
  • 93115f9232
    Renamed OverloadedFunctionType to OverloadedType for brevity and to reflect the fact that non-function types are now supported for overloads. No functional change, just a rename. (#8708) Eric Traut 2024-08-08 18:16:30 -0600
  • 03d03f7865 Renamed OverloadedFunctionType to OverloadedType for brevity and to reflect the fact that non-function types are now supported for overloads. No functional change, just a rename. Eric Traut 2024-08-08 18:07:59 -0600
  • 1d5420cb75
    Further simplified TypeVar constraint tracking and solving. Removed the need to track separate constraints for dest and src. (#8707) Eric Traut 2024-08-08 17:58:48 -0600
  • 28d8fecbb6 Further simplified TypeVar constraint tracking and solving. Removed the need to track separate constraints for dest and src. Eric Traut 2024-08-06 00:44:57 -0600
  • 3e448e7615
    Fixed regression that resulted in a hang when determining whether an overload implementation with generics was compatible with its overloads. This addresses #8687. (#8706) Eric Traut 2024-08-08 17:29:08 -0600
  • 937d4ddec4
    Merge branch 'main' into rchiodo/document_compiler_flags Rich Chiodo 2024-08-08 16:24:08 -0700
  • 5533ebd9d4 Fixed regression that resulted in a hang when determining whether an overload implementation with generics was compatible with its overloads. This addresses #8687. Eric Traut 2024-08-08 16:47:15 -0600
  • 1f193580c8
    Fix fileInfo null error (#8702) Kacie Kang 2024-08-08 16:08:33 -0700
  • 88e2039325
    Merge branch 'main' into kacie/pylance6234 Kacie Kang 2024-08-08 15:51:01 -0700
  • 616e2c5c86 Fixed regression that resulted in a hang when determining whether an overload implementation with generics was compatible with its overloads. This addresses #8687. Eric Traut 2024-08-08 16:47:15 -0600
  • c2a27b0123 removing fileinfo in if statement Kacie Kang 2024-08-08 14:41:31 -0700
  • f3719499ae check for binding Kacie Kang 2024-08-08 14:28:48 -0700
  • ce7e0a0376
    Merge branch 'main' into rchiodo/document_compiler_flags Rich Chiodo 2024-08-08 14:10:59 -0700
  • 71954dedae Make sure extraPaths and python env information is updated from the command line Rich Chiodo false 2024-08-08 13:52:20 -0700
  • e8f0965e5b
    Removed overly-complicated (and buggy) internal function setTypeArgsRecursive. (#8703) Eric Traut 2024-08-08 13:48:16 -0600
  • 977db255f7 Removed overly-complicated (and buggy) internal function setTypeArgsRecursive. Eric Traut 2024-08-08 13:23:07 -0600
  • 2f06a48e2e fix file info null reference Kacie Kang 2024-08-08 12:04:19 -0700
  • 65ea3e95b4
    Fixed bug that results in a false positive error when type argument for Literal doesn't follow type expression rules within a value expression context. This addresses 8696. (#8700) Eric Traut 2024-08-08 12:37:39 -0600
  • efda709120
    Fixed a bug that results in a false positive reportInconsistentOverload error when the implementation of the overload includes a decorator that changes the type of the implementation to a non-function type. This addresses #8692. (#8699) Eric Traut 2024-08-08 12:26:27 -0600
  • 455326a932 Fixed bug that results in a false positive error when type argument for Literal doesn't follow type expression rules within a value expression context. This addresses 8696. Eric Traut 2024-08-08 12:22:05 -0600
  • fe6362d3ef Make sure config options cannot be overridden by settings.json Rich Chiodo false 2024-08-08 11:10:53 -0700
  • 5bdd9379b6 Fixed a bug that results in a false positive reportInconsistentOverload error when the implementation of the overload includes a decorator that changes the type of the implementation to a non-function type. This addresses #8692. Eric Traut 2024-08-08 11:51:50 -0600
  • 1e3cef617f Fixed a bug that results in a false positive reportInconsistentOverload error when the implementation of the overload includes a decorator that changes the type of the implementation to a non-function type. This addresses #8692. Eric Traut 2024-08-08 11:51:50 -0600
  • 2b603b9144
    Modified OverloadedFunctionType interface in preparation for a follow-on change. Users of OverloadedFunctionType must now use the accessor functions to get the overloads and implementation. (#8695) Eric Traut 2024-08-08 09:32:21 -0600
  • 8d50c56168 Modified OverloadedFunctionType interface in preparation for a follow-on change. Users of OverloadedFunctionType must now use the accessor functions to get the overloads and implementation. Eric Traut 2024-08-08 08:54:41 -0600
  • 8c628b0bc4 Fixed bug that results in a crash when an empty tuple is used to specialize a generic type alias parameterized by a ParamSpec. This addresses #8694. Eric Traut 2024-08-08 00:13:28 -0600
  • 3d52679f59 Added optimization to shortcut overlapping overload checks if the diagnostic is suppressed. Eric Traut 2024-08-07 12:10:32 -0600
  • 51c98aa945 Added small optimization that skips checks for overload consistency if these diagnostics are suppressed. Eric Traut 2024-08-07 12:06:15 -0600
  • d2c0938f2b Updated example execution environments in documentation to include type checking settings. Eric Traut 2024-08-07 10:29:56 -0600
  • f0c0dc8d4d Published 1.1.375 1.1.375 Eric Traut 2024-08-06 20:32:59 -0600
  • 212c0d3fd7 Further simplified TypeVar constraint tracking and solving. Removed the need to track separate constraints for dest and src. Eric Traut 2024-08-06 00:44:57 -0600
  • a9d72a239f Bug fix Eric Traut 2024-08-06 17:51:19 -0600
  • 5589f06936
    Update azuredevops release pipeline (#8402) Bill Schnurr 2024-08-06 16:09:31 -0700
  • 3eff542b97 remove condition on publish bschnurr 2024-08-06 15:55:52 -0700
  • 86f193b539 Further simplified TypeVar constraint tracking and solving. Removed the need to track separate constraints for dest and src. Eric Traut 2024-08-06 00:44:57 -0600
  • bb40747289
    Merge branch 'main' into bschnurr-fix-signing Bill Schnurr 2024-08-06 15:41:30 -0700
  • e5889207ff Fixed bug that causes infinite recursion and memory exhaustion under certain circumstances involving recursive type aliases where the type alias is used as a type argument. This addresses #8670. Eric Traut 2024-08-06 16:39:26 -0600
  • 6d4f3d14ec
    Merge branch 'main' into bschnurr-fix-signing Bill Schnurr 2024-08-06 15:37:38 -0700