You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of @property.setter in QuantConnectStubsGenerator incorrectly generates the decorator as @property.setter instead of @<property_name>.setter. This causes PyLance and other Python tools to report a redeclaration error (reportRedeclaration) when a property and its setter share the same name.
Steps to Reproduce:
Generate stubs using QuantConnectStubsGenerator.
Define a property with both a getter and a setter in the codebase.
Observe the generated output for the property and its setter.
Description:
The current implementation of
@property.setter
inQuantConnectStubsGenerator
incorrectly generates the decorator as@property.setter
instead of@<property_name>.setter
. This causes PyLance and other Python tools to report a redeclaration error (reportRedeclaration
) when a property and its setter share the same name.Steps to Reproduce:
QuantConnectStubsGenerator
.Example of Incorrect Output:
Expected Output:
The setter decorator should use the property name explicitly:
Fix:
The issue can be fixed by updating the
PropertyRenderer
to use the correct setter decorator. Here's the proposed change:Impact:
This bug affects compatibility with PyLance and other Python tooling, leading to false-positive errors during development.
Environment:
Additional Notes:
Please let me know if more details or a pull request are needed. Thank you for maintaining this great tool! 😊
The text was updated successfully, but these errors were encountered: