nasa / fprime-tools

F´ Python tooling and helpers.
https://github.com/nasa/fprime
Apache License 2.0
21 stars 39 forks source link

Fix anti-pattern comparison test: use of `is` when comparing the `type` of two objects #75

Closed ThibFrgsGmz closed 2 years ago

ThibFrgsGmz commented 2 years ago
Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s) (void)
Has Unit Tests (y/n) n
Builds Without Errors (y/n) Let CI run
Unit Tests Pass (y/n) Let CI run
Documentation Included (y/n) n

Change Description

This PR aims to correct an antipattern issue regarding a bad comparison identity test.

Rationale

It is recommended to use the identity test ( is ) instead of the equality test ( == ) when we need to compare the types of two objects.

Testing/Review Recommendations

(void)

Future Work

(void)