Skip to content

Fix comparison to None and True plus test for membership #10979

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

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Mar 8, 2023

Fix some basic PEP8 issues with https://beta.ruff.rs

$ ruff --exclude=tests,ports/cc3200/tools/uniflash.py --select=E711,E712,E713 --statistics .

7	E711	[*] Comparison to `None` should be `cond is None`
2	E712	[*] Comparison to `True` should be `cond is True`
3	E713	[*] Test for membership should be `not in`

ruff --fix .

$ ruff --exclude=tests,ports/cc3200/tools/uniflash.py --select=E711,E712,E713 --fix .

Found 12 errors (12 fixed, 0 remaining).

@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
        rp2:    +0 +0.000% PICO

@dpgeorge
Copy link
Member

dpgeorge commented Mar 8, 2023

Thanks for the contribution. These changes look good.

@dpgeorge dpgeorge force-pushed the Comparison_to_None_and_True branch from 6f73fb2 to 4376c96 Compare March 10, 2023 02:33
@dpgeorge dpgeorge merged commit 4376c96 into micropython:master Mar 10, 2023
@cclauss cclauss deleted the Comparison_to_None_and_True branch March 10, 2023 03:34
cclauss added a commit to cclauss/micropython that referenced this pull request Mar 10, 2023
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