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

Add python linter (flake8) to workflow and fix exceptions in python files [ part #25193 ] #25220

Closed

Conversation

DamMicSzm
Copy link
Contributor

This pull request is a part of #25193 ( part fix exceptions in python files. )

Problem

Python files need prevent things like syntax errors, typos, bad style, etc... it saves time for reviewing your code. Many python files needed bug fixes.

Changes

Fixed all files where Linter found errors with except and added Linter with temporary exclusion of other errors from flake8 in workflow

Testing

CI will test and maybe some another manual testing

@github-actions
Copy link

PR #25220: Size comparison from 3951efb to 6e9d17d

Full report (1 build for cc32xx)
platform target config section 3951efb 6e9d17d change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 642545 642545 0 0.0
(read/write) 203664 203664 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197064 197064 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 930168 930168 0 0.0
.debug_aranges 87272 87272 0 0.0
.debug_frame 299752 299752 0 0.0
.debug_info 20254059 20254059 0 0.0
.debug_line 2655143 2655143 0 0.0
.debug_loc 2795383 2795383 0 0.0
.debug_ranges 281592 281592 0 0.0
.debug_str 3017470 3017470 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105817 105817 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 377598 377598 0 0.0
.symtab 256144 256144 0 0.0
.text 534604 534604 0 0.0

@@ -53,7 +53,7 @@ def decode_string(tstr, detok):
if s.find('$') == 0:
return None
return s
except:
except ValueError:
Copy link
Contributor

Choose a reason for hiding this comment

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

I strongly suggest doing the fixes by area, not by fixup type. This change needs review from someone familiar with this specific script, for example....

@DamMicSzm DamMicSzm closed this Feb 22, 2023
@DamMicSzm DamMicSzm deleted the add-flake8-and-fix-except branch July 13, 2023 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants