Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
From John Doe:
- Whatever John Doe did.

From Thaddeus Crews:
- Ruff: Handle F401 exclusions more granularly, remove per-file exclusions.

From William Deegan:
- Fix SCons Docbook schema to work with lxml > 5

Expand Down
2 changes: 2 additions & 0 deletions RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ DEVELOPMENT

- Introduce some unit tests for the file locking utility routines

- Ruff: Handle F401 exclusions more granularly, remove per-file exclusions.

Thanks to the following contributors listed below for their contributions to this release.
==========================================================================================
.. code-block:: text
Expand Down
10 changes: 4 additions & 6 deletions SCons/Util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,19 @@
from __future__ import annotations

import copy
import hashlib
import logging
import os
import re
import sys
import time
from collections import UserDict, UserList, deque
from contextlib import suppress
from types import MethodType, FunctionType
from typing import Any
from logging import Formatter

# Util split into a package. Make sure things that used to work
# when importing just Util itself still work:
from .sctypes import (
from .sctypes import ( # noqa: F401
DictTypes,
ListTypes,
SequenceTypes,
Expand All @@ -90,7 +88,7 @@
get_os_env_bool,
get_environment_var,
)
from .hashes import (
from .hashes import ( # noqa: F401
ALLOWED_HASH_FORMATS,
DEFAULT_HASH_FORMATS,
get_hash_format,
Expand All @@ -103,15 +101,15 @@
MD5filesignature,
MD5collect,
)
from .envs import (
from .envs import ( # noqa: F401
MethodWrapper,
PrependPath,
AppendPath,
AddPathIfNotExists,
AddMethod,
is_valid_construction_var,
)
from .filelock import FileLock, SConsLockFailure
from .filelock import FileLock, SConsLockFailure # noqa: F401

PYPY = hasattr(sys, 'pypy_translation_info')

Expand Down
1 change: 0 additions & 1 deletion SCons/Variables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import SCons.Errors
import SCons.Util
import SCons.Warnings

# Note: imports are for the benefit of SCons.Main (and tests); since they
# are not used here, the "as Foo" form is for checkers.
Expand Down
8 changes: 0 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ extend-safe-fixes = ["FA", "UP006", "UP007"]
[tool.ruff.format]
quote-style = "preserve" # Equivalent to black's "skip-string-normalization"

[tool.ruff.lint.per-file-ignores]
"SCons/Util/__init__.py" = [
"F401", # Module imported but unused
]
"SCons/Variables/__init__.py" = [
"F401", # Symbol imported but unused
]

[tool.mypy]
python_version = "3.8"
exclude = [
Expand Down
4 changes: 2 additions & 2 deletions test/Scanner/Python/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# Copyright The SCons Foundation

import package1 # noqa: F401
import package2 # noqa: F401
import package1
import package2
import sys

with open(sys.argv[1], 'w') as f:
Expand Down
2 changes: 1 addition & 1 deletion test/Scanner/Python/to_be_copied/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Copyright The SCons Foundation

from . import helper # noqa: F401
from . import helper
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Copyright The SCons Foundation

from simple_package.module1 import somefunc # noqa: F401
from simple_package.module1 import somefunc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# Copyright The SCons Foundation

from nested1 import module, nested2 # noqa: F401
from nested1 import module, nested2
6 changes: 3 additions & 3 deletions test/fixture/python_scanner/imports_unknown_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#
# Copyright The SCons Foundation

import doesntexist # noqa: F401
import notthere.something # noqa: F401
from notthere import a, few, things # noqa: F401
import doesntexist
import notthere.something
from notthere import a, few, things
2 changes: 1 addition & 1 deletion test/option/debug-memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

if not IS_WINDOWS:
try:
import resource # noqa: F401
import resource
except ImportError:
x = "Python version has no 'resource' skipping tests.\n"
test.skip_test(x)
Expand Down
Loading