-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pylint has been disabled since the migration to Python 3.12. It's valuable to have as a backstop for simple programming mistakes, so this PR tries to re-enable it. **How to test** If the build passes, we did it!
- Loading branch information
Showing
8 changed files
with
66 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
# Validate Python code | ||
set -eu | ||
scriptdir=$(cd $(dirname $0) && pwd) | ||
cd $scriptdir/../.. | ||
|
||
echo "------> Check Python for problems using pylint" | ||
|
||
# Find all .py files to validate, except those in the 'prefixes' directory. | ||
# Syntax: ( <condition> -o <condition> -o <condition> ... -prune ) | ||
pyfiles=$(find . -not \( -path ./.\* -o -path ./prefixes -prune \) -name \*.py) | ||
|
||
# Get the system/library directories. pylint should not report any errors against those. | ||
sysdirs=$(python3 -c 'import sys; print(",".join(p for p in sys.path if p))') | ||
|
||
pylint -E \ | ||
--jobs 0 \ | ||
--ignore-paths $sysdirs \ | ||
$pyfiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
import gettext | ||
from flask_babel import gettext | ||
import os | ||
from flask import make_response, request, session | ||
|
||
|