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

Small fixes for modern flake8. #1264

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

clalancette
Copy link
Contributor

It doesn't like to compare types with ==, so switch to isinstance as appropriate.

It doesn't like to compare types with ==, so switch to
isinstance as appropriate.

Signed-off-by: Chris Lalancette <[email protected]>
@clalancette
Copy link
Contributor Author

clalancette commented Mar 26, 2024

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

lgtm with green CI

@clalancette clalancette merged commit 61e0409 into rolling Mar 26, 2024
2 of 3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the clalancette/flake8-fixes branch March 26, 2024 18:31
InvincibleRMC pushed a commit to InvincibleRMC/rclpy that referenced this pull request Mar 27, 2024
It doesn't like to compare types with ==, so switch to
isinstance as appropriate.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
InvincibleRMC pushed a commit to InvincibleRMC/rclpy that referenced this pull request Apr 5, 2024
It doesn't like to compare types with ==, so switch to
isinstance as appropriate.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
sloretz added a commit that referenced this pull request Aug 2, 2024
* Add types to parameter.py

Signed-off-by: Michael Carlstrom <[email protected]>

* Revert "Add types to TypeHash and moved away from __slots__ usage (#1232)" (#1243)

This reverts commit b06baef.

Signed-off-by: Michael Carlstrom <[email protected]>

* Add back Type hash __slots__ and add test cases. (#1245)

* Add types to TypeHash and add test cases

Signed-off-by: Michael Carlstrom <[email protected]>

* Add types to context.py (#1240)

Signed-off-by: Michael Carlstrom <[email protected]>

* Add types to qos_overriding_options.py (#1248)

Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>

* Small fixes for modern flake8. (#1264)

It doesn't like to compare types with ==, so switch to
isinstance as appropriate.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>

* Add types to time_source.py (#1259)

* Add types to time_source.py

Signed-off-by: Michael Carlstrom <[email protected]>

* fix small bug

Signed-off-by: Michael Carlstrom <[email protected]>

* Switch to overloads to avoid mypy3737

Signed-off-by: Michael Carlstrom <[email protected]>

* Update parameter declaration from Node

Signed-off-by: Michael Carlstrom <[email protected]>

* add back rclpy.

Signed-off-by: Michael Carlstrom <[email protected]>

* Fix flake8 imports

Signed-off-by: Michael Carlstrom <[email protected]>

* Add proper array.array[]

Signed-off-by: Michael Carlstrom <[email protected]>

* Update types of declare_parameter, declare_parameters api

Signed-off-by: Michael Carlstrom <[email protected]>

* Add non conflicting types back to constructor

Signed-off-by: Michael Carlstrom <[email protected]>

* Move sys import

Signed-off-by: Michael Carlstrom <[email protected]>

* Update error message

Signed-off-by: Michael Carlstrom <[email protected]>

* Add default value for generic Parameter

Signed-off-by: Michael Carlstrom <[email protected]>

* Add explanation comment

Signed-off-by: Michael Carlstrom <[email protected]>

* Add TypeVar import inside else case

Signed-off-by: Michael Carlstrom <[email protected]>

* push to rerun ci

Signed-off-by: Michael Carlstrom <[email protected]>

* push to rerun ci

Signed-off-by: Michael Carlstrom <[email protected]>

* Switch back to union

Signed-off-by: Michael Carlstrom <[email protected]>

---------

Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
sloretz added a commit that referenced this pull request Aug 5, 2024
* Add types to timer.py

Signed-off-by: Michael Carlstrom <[email protected]>

* Small fixes for modern flake8. (#1264)

It doesn't like to compare types with ==, so switch to
isinstance as appropriate.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>

* Add types to time_source.py (#1259)

* Add types to time_source.py

Signed-off-by: Michael Carlstrom <[email protected]>

* Add TimerHandle docstring

Signed-off-by: Michael Carlstrom <[email protected]>

* resolve merge conflicts

Signed-off-by: Michael Carlstrom <[email protected]>

* Fix Callback input to be optional

Signed-off-by: Michael Carlstrom <[email protected]>

---------

Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
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.

3 participants