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

Fixed Python script errors flagged by pyflakes #1604

Conversation

StefanHabel
Copy link
Contributor

$ flake8 python/scripts --select F
python/scripts/generateshader.py:28:13: F841 local variable 'result' is assigned to but never used
python/scripts/generateshader.py:86:16: F821 undefined name 'err'
python/scripts/generateshader.py:87:43: F821 undefined name 'err'
python/scripts/genmdl.py:8:1: F401 'string' imported but unused
python/scripts/genmdl.py:344:5: F841 local variable 'LIBRARY' is assigned to but never used
python/scripts/genmdl.py:525:21: F841 local variable 'outputvalue' is assigned to but never used
python/scripts/mxdoc.py:6:1: F401 'os' imported but unused
python/scripts/mxformat.py:7:1: F401 'sys' imported but unused
python/scripts/mxvalidate.py:6:1: F401 'os' imported but unused
python/scripts/mxvalidate.py:28:16: F821 undefined name 'err'
python/scripts/mxvalidate.py:29:19: F821 undefined name 'err'

With this patch:

$ flake8 python/scripts --select F --count
0

Found while working on #1595.

This commit follows 83ae82e.

```bash
$ flake8 python/scripts --select F
python/scripts/generateshader.py:28:13: F841 local variable 'result' is assigned to but never used
python/scripts/generateshader.py:86:16: F821 undefined name 'err'
python/scripts/generateshader.py:87:43: F821 undefined name 'err'
python/scripts/genmdl.py:8:1: F401 'string' imported but unused
python/scripts/genmdl.py:344:5: F841 local variable 'LIBRARY' is assigned to but never used
python/scripts/genmdl.py:525:21: F841 local variable 'outputvalue' is assigned to but never used
python/scripts/mxdoc.py:6:1: F401 'os' imported but unused
python/scripts/mxformat.py:7:1: F401 'sys' imported but unused
python/scripts/mxvalidate.py:6:1: F401 'os' imported but unused
python/scripts/mxvalidate.py:28:16: F821 undefined name 'err'
python/scripts/mxvalidate.py:29:19: F821 undefined name 'err'
```

With this patch:
```bash
$ flake8 python/scripts --select F --count
0
```

Found while working on AcademySoftwareFoundation#1595.

This commit follows 83ae82e.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
@jstone-lucasfilm
Copy link
Member

This looks really promising, thanks @StefanHabel!

@jstone-lucasfilm jstone-lucasfilm changed the title Fixed code errors in Python scripts flagged by pyflakes. Fixed Python script errors flagged by pyflakes Nov 27, 2023
Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a comment

Choose a reason for hiding this comment

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

These fixes look good to me, thanks @StefanHabel!

@jstone-lucasfilm jstone-lucasfilm merged commit 273b8a5 into AcademySoftwareFoundation:main Nov 27, 2023
31 checks passed
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.

None yet

2 participants