Skip to content

Resolve some lint warnings#4

Closed
bact wants to merge 2 commits into
JPEWdev:mainfrom
bact:fix-lint
Closed

Resolve some lint warnings#4
bact wants to merge 2 commits into
JPEWdev:mainfrom
bact:fix-lint

Conversation

@bact

@bact bact commented Nov 6, 2025

Copy link
Copy Markdown
Contributor
  • Remove nonlocal declarations in main.py lines 80-84, these variables are accessed inside the scope but never been assigned, so 'nonlocal' declarations are unnecessary (flagged by flake8 as "name is never assigned in scope" - https://github.com/JPEWdev/spdx3-validate/actions/runs/19065698022/job/54455665884?pr=3#step:5:41 )
  • Use 'err' instead of 'e' in main.py lines 314-315, 319-320, 325-327, 337-338, 343-345, to avoid complains about assigning 'e' outside exception block (flagged by mypy)
  • Sort import & add docstrings

bact added 2 commits November 6, 2025 22:10
- Remove nonlocal declarations in main.py lines 80-84, these variables are accessed inside the scope but never been assigned, so 'nonlocal' declarations are unnecessary (flagged by flake8 as "name is never assigned in scope")
- Use 'err' instead of 'e' in lines 314-315, 319-320, 325-327, 337-338, 343-345, to avoid complains about assigning 'e' outside exception block (flagged by mypy)
- Sort import & add docstrings

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact

bact commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

The nonlocals are fixed in #10.

Others are better covered in #11.

Close this.

@bact bact closed this Jun 4, 2026
@bact bact deleted the fix-lint branch June 4, 2026 19:24
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.

1 participant