This is an automated email from the ASF dual-hosted git repository.
gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git
The following commit(s) were added to refs/heads/trunk by this push:
new 029ccb8 Fix lint errors.
029ccb8 is described below
commit 029ccb801be7d6aabca7edd420440d6359df4bde
Author: Greg Stein <[email protected]>
AuthorDate: Wed Sep 24 01:22:47 2025 -0500
Fix lint errors.
* remove unused imports
* flag two imports as needed for their side effects
* fix bug in serve_static()
* yna.tally(): the kv arg is unused. Mark as such.
---
v3/server/main.py | 7 +++----
v3/server/pages.py | 3 ++-
v3/steve/election.py | 2 --
v3/steve/vtypes/yna.py | 2 +-
v3/test/check_coverage.py | 1 -
5 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/v3/server/main.py b/v3/server/main.py
index 0463ffc..1c1ce29 100755
--- a/v3/server/main.py
+++ b/v3/server/main.py
@@ -20,8 +20,6 @@ import logging
import pathlib
import asfquart
-from easydict import EasyDict as edict
-import ezt
_LOGGER = logging.getLogger(__name__)
DATE_FORMAT = '%m/%d %H:%M'
@@ -40,9 +38,10 @@ def main():
# Now that we have an APP, import modules that will add page
# and API endpoints into the APP.
- import pages
- import api
+ import pages # pylint: disable=unused-import
+ import api # pylint: disable=unused-import
+ # Spool up the app!
app.runx(port=app.cfg.port)
diff --git a/v3/server/pages.py b/v3/server/pages.py
index b794519..e9f6c4b 100644
--- a/v3/server/pages.py
+++ b/v3/server/pages.py
@@ -15,6 +15,7 @@
# limitations under the License.
#
+import quart
import asfquart
APP = asfquart.APP
@@ -58,4 +59,4 @@ async def about_page():
# Route to serve static files (CSS and JS)
@APP.route('/static/<path:filename>')
async def serve_static(filename):
- return await send_from_directory('static', filename)
+ return await quart.send_from_directory('static', filename)
diff --git a/v3/steve/election.py b/v3/steve/election.py
index 86c1bc0..02c7638 100644
--- a/v3/steve/election.py
+++ b/v3/steve/election.py
@@ -20,9 +20,7 @@
#
#
-import sys
import json
-import secrets
from . import crypto
from . import db
diff --git a/v3/steve/vtypes/yna.py b/v3/steve/vtypes/yna.py
index c5e135f..c80f04e 100644
--- a/v3/steve/vtypes/yna.py
+++ b/v3/steve/vtypes/yna.py
@@ -25,7 +25,7 @@ NO = { 'n', 'no', '0', 'false', }
# "abstain" is any other (non-affirmative) value.
-def tally(votestrings, kv):
+def tally(votestrings, _kv):
y = n = a = 0
for v in votestrings:
if v in YES:
diff --git a/v3/test/check_coverage.py b/v3/test/check_coverage.py
index 042b2bc..5ea39f5 100755
--- a/v3/test/check_coverage.py
+++ b/v3/test/check_coverage.py
@@ -26,7 +26,6 @@
import sys
import os.path
import sqlite3
-import json
import coverage # pip3 install coverage