Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected information that Sensor.is_listening is (currently) a method #7439

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Apr 15, 2024

Description

carla.Sensor.is_listening is defined twice (since #6013) the <0.9.14 property is overwritten with a method; can also be seen in the Docs

This PR removes the overwritten property and updates the doc, keeping the 0.9.14+ method version in tact.

.add_property("is_listening", &cc::Sensor::IsListening)
.def("listen", &SubscribeToStream, (arg("callback")))
.def("is_listening", &cc::Sensor::IsListening)

Where has this been tested?

  • Platform(s): Ubuntu 22.04
  • Python version(s): 3.7 and 3.10
  • Unreal Engine version(s): 4.26
  • all checks green

Possible Drawbacks

None.

Future work, make it a property again?

I at least would prefer function names like is_listening as a property. On one side, it would break the current 0.9.14/15 compatibility, on the other it would restore the one from <0.9.13 which still is found in code more often.
So we might want to shift the three Sensor.is_... functions to a property.

@Daraan Daraan requested a review from a team as a code owner April 15, 2024 17:34
Copy link

update-docs bot commented Apr 15, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

@Daraan Daraan changed the title Corrected information that Sensor.is_listening is a method Corrected information that Sensor.is_listening is (currently) a method Apr 15, 2024
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.

None yet

1 participant