import os.path -> os (#48709)

This commit is contained in:
Harmen Stoppels 2025-01-28 09:45:43 +01:00 committed by GitHub
parent bc28ec35d1
commit c054cb818d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
97 changed files with 72 additions and 98 deletions

View File

@ -25,7 +25,6 @@ exit 1
# The code above runs this file with our preferred python interpreter.
import os
import os.path
import sys
min_python3 = (3, 6)

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""URL primitives that just require Python standard library."""
import itertools
import os.path
import os
import re
from typing import Optional, Set, Tuple
from urllib.parse import urlsplit, urlunsplit

View File

@ -5,7 +5,7 @@
import fnmatch
import glob
import importlib
import os.path
import os
import re
import sys
import sysconfig

View File

@ -4,7 +4,7 @@
"""Manage configuration swapping for bootstrapping purposes"""
import contextlib
import os.path
import os
import sys
from typing import Any, Dict, Generator, MutableSequence, Sequence

View File

@ -25,7 +25,6 @@
import functools
import json
import os
import os.path
import sys
import uuid
from typing import Any, Callable, Dict, List, Optional, Tuple

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import stat
import subprocess
from typing import Callable, List, Optional, Set, Tuple, Union

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import shutil
import sys
import tempfile

View File

@ -4,7 +4,7 @@
import argparse
import os.path
import os
import textwrap
from llnl.util.lang import stable_partition

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import llnl.util.tty

View File

@ -5,7 +5,7 @@
"""Implementation details of the ``spack module`` command."""
import collections
import os.path
import os
import shutil
import sys

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import shutil
import llnl.util.tty as tty

View File

@ -5,7 +5,7 @@
import argparse
import collections
import io
import os.path
import os
import re
import sys

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Manages the details on the images used in the various stages."""
import json
import os.path
import os
import shlex
import sys

View File

@ -15,7 +15,6 @@
import glob
import itertools
import os
import os.path
import pathlib
import re
import sys

View File

@ -7,7 +7,6 @@
import collections
import concurrent.futures
import os
import os.path
import re
import sys
import traceback

View File

@ -32,7 +32,7 @@ class OpenMpi(Package):
"""
import collections
import collections.abc
import os.path
import os
import re
from typing import Any, Callable, List, Optional, Tuple, Type, Union

View File

@ -25,7 +25,6 @@
import functools
import http.client
import os
import os.path
import re
import shutil
import urllib.error

View File

@ -14,7 +14,6 @@
import io
import operator
import os
import os.path
import pstats
import re
import shlex

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
from typing import Optional
import llnl.url

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import traceback
import llnl.util.tty as tty

View File

@ -31,7 +31,7 @@
import copy
import datetime
import inspect
import os.path
import os
import re
import string
from typing import List, Optional

View File

@ -4,7 +4,7 @@
import collections
import itertools
import os.path
import os
from typing import Dict, List, Optional, Tuple
import llnl.util.filesystem as fs

View File

@ -5,7 +5,7 @@
"""This module implements the classes necessary to generate Tcl
non-hierarchical modules.
"""
import os.path
import os
from typing import Dict, Optional, Tuple
import spack.config

View File

@ -4,7 +4,6 @@
import hashlib
import os
import os.path
import pathlib
import sys
from typing import Any, Dict, Optional, Tuple, Type, Union

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
def slingshot_network():

View File

@ -14,7 +14,6 @@
import inspect
import itertools
import os
import os.path
import random
import re
import shutil

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
import hashlib
import os.path
import os
import platform
import posixpath
import re

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import spack.tengine

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import pytest

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import pytest

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import sys
import pytest

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import platform
import pytest

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import sys
import pytest

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import re
import pytest

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import sys
from textwrap import dedent

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import re
import pytest

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import pytest

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import sys
import pytest

View File

@ -12,7 +12,6 @@
import itertools
import json
import os
import os.path
import pathlib
import re
import shutil

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import pytest

View File

@ -6,7 +6,6 @@
This test verifies that the Spack directory layout works properly.
"""
import os
import os.path
from pathlib import Path
import pytest

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import fnmatch
import os.path
import os
import sys
import pytest

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import re
import sys
from datetime import datetime, timedelta
@ -23,7 +23,7 @@ def now():
def module_path(tmpdir):
m = tmpdir.join("foo.py")
content = """
import os.path
import os
value = 1
path = os.path.join('/usr', 'bin')

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import json
import os.path
import os
import jsonschema
import pytest

View File

@ -4,7 +4,6 @@
"""Test Spack's URL handling utility functions."""
import os
import os.path
import urllib.parse
import pytest

View File

@ -7,7 +7,6 @@
import inspect
import json
import os
import os.path
import pickle
import re
import shlex

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import re
import shlex
import sys

View File

@ -7,7 +7,6 @@
import errno
import json
import os
import os.path
import re
import shutil
import ssl

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import spack.build_systems.autotools
from spack.package import *

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import copy
import os
import os.path
import sys
import spack.util.environment

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os.path
import os
from spack.package import *
from spack.util.environment import is_system_path

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import llnl.util.lang

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import spack.build_systems.autotools
import spack.build_systems.meson

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.hooks.sbang import filter_shebang
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import platform
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import sys
from spack.package import *

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import llnl.util.lang as lang

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import re
import shutil
from textwrap import dedent

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import re
import sys

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import os.path
import re
import sys

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import re
import sys

View File

@ -1,7 +1,7 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
import re
import shutil
import sys

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import os.path
import os
import re
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os.path
import os
from spack.package import *