Skip to content

Commit d0e3de1

Browse files
authored
Merge branch 'main' into TRY
2 parents e166477 + 6c224d3 commit d0e3de1

22 files changed

+78
-40
lines changed

.coveragerc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ disable_warnings =
1212
[report]
1313
show_missing = True
1414
exclude_also =
15-
# jaraco/skeleton#97
16-
@overload
15+
# Exclude common false positives per
16+
# https://coverage.readthedocs.io/en/latest/excluding.html#advanced-exclusion
17+
# Ref jaraco/skeleton#97 and jaraco/skeleton#135
18+
class .*\bProtocol\):
1719
if TYPE_CHECKING:

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.1.8
3+
rev: v0.5.6
44
hooks:
55
- id: ruff
6+
args: [--fix, --unsafe-fixes]
67
- id: ruff-format

distutils/_modified.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def missing_as_newer(source):
6363
return missing == 'newer' and not os.path.exists(source)
6464

6565
ignored = os.path.exists if missing == 'ignore' else None
66-
return any(
66+
return not os.path.exists(target) or any(
6767
missing_as_newer(source) or _newer(source, target)
6868
for source in filter(ignored, sources)
6969
)

distutils/archive_util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ def make_archive(
266266
raise ValueError(f"unknown archive format '{format}'")
267267

268268
func = format_info[0]
269-
for arg, val in format_info[1]:
270-
kwargs[arg] = val
269+
kwargs.update(format_info[1])
271270

272271
if format != 'zip':
273272
kwargs['owner'] = owner

distutils/command/build_ext.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,7 @@ def swig_sources(self, sources, extension):
638638

639639
# Do not override commandline arguments
640640
if not self.swig_opts:
641-
for o in extension.swig_opts:
642-
swig_cmd.append(o)
641+
swig_cmd.extend(extension.swig_opts)
643642

644643
for source in swig_sources:
645644
target = swig_targets[source]

distutils/command/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ def create_home_path(self):
680680
if not self.user:
681681
return
682682
home = convert_path(os.path.expanduser("~"))
683-
for _name, path in self.config_vars.items():
683+
for path in self.config_vars.values():
684684
if str(path).startswith(home) and not os.path.isdir(path):
685685
self.debug_print(f"os.makedirs('{path}', 0o700)")
686686
os.makedirs(path, 0o700)
-217 KB
Binary file not shown.

distutils/command/wininst-10.0.exe

-187 KB
Binary file not shown.
-574 KB
Binary file not shown.

distutils/command/wininst-14.0.exe

-448 KB
Binary file not shown.

0 commit comments

Comments
 (0)