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 Q003 rule to accommodate the nested f-strings is a bit too complex. It can possibly be simplified using two loops instead of one. The outer loop is the regular token loop while the inner loop would be for the f-strings. When the outer loop encounters the FStringStart token, then the control would go to the inner loop where it would be easier to just break if it's not possible to perform the check.
This is low priority and an internal refactor for readability purpose.
The text was updated successfully, but these errors were encountered:
## Summary
This PR moves the `Q003` rule to AST checker.
This is the final rule that used the docstring detection state machine
and thus this PR removes it as well.
resolves: #7595resolves: #7808
## Test Plan
- [x] `cargo test`
- [x] Make sure there are no changes in the ecosystem
The current implementation of
Q003
rule to accommodate the nested f-strings is a bit too complex. It can possibly be simplified using two loops instead of one. The outer loop is the regular token loop while the inner loop would be for the f-strings. When the outer loop encounters theFStringStart
token, then the control would go to the inner loop where it would be easier to justbreak
if it's not possible to perform the check.This is low priority and an internal refactor for readability purpose.
The text was updated successfully, but these errors were encountered: