vermin: remove all novm comments from code (#34308)
All the vermin annotations we were using were for optional features introduced in early Python 3 versions. We no longer need any of them, as we only support Python 3.6+. If we start optionally using features from newer Pythons than 3.6, we will need more vermin annotations. Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com> Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
parent
1670c325c6
commit
54008a2342
@ -7,7 +7,7 @@
|
|||||||
import os.path
|
import os.path
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import llnl.util.filesystem as fs
|
import llnl.util.filesystem as fs
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import inspect
|
import inspect
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import llnl.util.filesystem as fs
|
import llnl.util.filesystem as fs
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import inspect
|
import inspect
|
||||||
import os
|
import os
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import llnl.util.filesystem as fs
|
import llnl.util.filesystem as fs
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import inspect
|
import inspect
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import llnl.util.filesystem as fs
|
import llnl.util.filesystem as fs
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from typing import Callable, Dict # novm
|
from typing import Callable, Dict
|
||||||
|
|
||||||
import spack.cmd.modules.lmod
|
import spack.cmd.modules.lmod
|
||||||
import spack.cmd.modules.tcl
|
import spack.cmd.modules.tcl
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
from typing import List, Optional, Sequence # novm
|
from typing import List, Optional, Sequence
|
||||||
|
|
||||||
import llnl.util.lang
|
import llnl.util.lang
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
import itertools
|
import itertools
|
||||||
import multiprocessing.pool
|
import multiprocessing.pool
|
||||||
import os
|
import os
|
||||||
from typing import Dict # novm
|
from typing import Dict
|
||||||
|
|
||||||
import archspec.cpu
|
import archspec.cpu
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from distutils.version import StrictVersion
|
from distutils.version import StrictVersion
|
||||||
from typing import Dict, List, Set # novm
|
from typing import Dict, List, Set
|
||||||
|
|
||||||
import spack.compiler
|
import spack.compiler
|
||||||
import spack.operating_systems.windows_os
|
import spack.operating_systems.windows_os
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import spack.compiler
|
import spack.compiler
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import ruamel.yaml as yaml
|
import ruamel.yaml as yaml
|
||||||
from ruamel.yaml.error import MarkedYAMLError
|
from ruamel.yaml.error import MarkedYAMLError
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from typing import Dict # novm
|
from typing import Dict
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import uuid
|
import uuid
|
||||||
|
@ -32,7 +32,7 @@ class OpenMpi(Package):
|
|||||||
import functools
|
import functools
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
from typing import List, Set # novm
|
from typing import List, Set
|
||||||
|
|
||||||
import llnl.util.lang
|
import llnl.util.lang
|
||||||
import llnl.util.tty.color
|
import llnl.util.tty.color
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
from typing import List, Optional # novm
|
from typing import List, Optional
|
||||||
|
|
||||||
import llnl.util
|
import llnl.util
|
||||||
import llnl.util.filesystem as fs
|
import llnl.util.filesystem as fs
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
import inspect
|
import inspect
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
from typing import Optional # novm
|
from typing import Optional
|
||||||
|
|
||||||
import llnl.util.filesystem
|
import llnl.util.filesystem
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
import itertools
|
import itertools
|
||||||
import os.path
|
import os.path
|
||||||
import posixpath
|
import posixpath
|
||||||
from typing import Any, Dict # novm
|
from typing import Any, Dict
|
||||||
|
|
||||||
import llnl.util.lang as lang
|
import llnl.util.lang as lang
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"""
|
"""
|
||||||
import posixpath
|
import posixpath
|
||||||
import string
|
import string
|
||||||
from typing import Any, Dict # novm
|
from typing import Any, Dict
|
||||||
|
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
import traceback
|
import traceback
|
||||||
import types
|
import types
|
||||||
import warnings
|
import warnings
|
||||||
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type # novm
|
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type
|
||||||
|
|
||||||
import llnl.util.filesystem as fsys
|
import llnl.util.filesystem as fsys
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import errno
|
import errno
|
||||||
import functools
|
import functools
|
||||||
import importlib
|
import importlib
|
||||||
import importlib.machinery # novm
|
import importlib.machinery
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import inspect
|
import inspect
|
||||||
import itertools
|
import itertools
|
||||||
@ -24,7 +24,7 @@
|
|||||||
import traceback
|
import traceback
|
||||||
import types
|
import types
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Dict # novm
|
from typing import Dict
|
||||||
|
|
||||||
import ruamel.yaml as yaml
|
import ruamel.yaml as yaml
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ def namespace_from_fullname(fullname):
|
|||||||
return namespace
|
return namespace
|
||||||
|
|
||||||
|
|
||||||
class _PrependFileLoader(importlib.machinery.SourceFileLoader): # novm
|
class _PrependFileLoader(importlib.machinery.SourceFileLoader):
|
||||||
def __init__(self, fullname, path, prepend=None):
|
def __init__(self, fullname, path, prepend=None):
|
||||||
super(_PrependFileLoader, self).__init__(fullname, path)
|
super(_PrependFileLoader, self).__init__(fullname, path)
|
||||||
self.prepend = prepend
|
self.prepend = prepend
|
||||||
@ -144,7 +144,7 @@ def find_spec(self, fullname, python_path, target=None):
|
|||||||
loader = self.compute_loader(fullname)
|
loader = self.compute_loader(fullname)
|
||||||
if loader is None:
|
if loader is None:
|
||||||
return None
|
return None
|
||||||
return importlib.util.spec_from_loader(fullname, loader) # novm
|
return importlib.util.spec_from_loader(fullname, loader)
|
||||||
|
|
||||||
def compute_loader(self, fullname):
|
def compute_loader(self, fullname):
|
||||||
# namespaces are added to repo, and package modules are leaves.
|
# namespaces are added to repo, and package modules are leaves.
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
import stat
|
import stat
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
from typing import Dict # novm
|
from typing import Dict
|
||||||
|
|
||||||
import llnl.util.lang
|
import llnl.util.lang
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
import itertools
|
import itertools
|
||||||
import textwrap
|
import textwrap
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import llnl.util.lang
|
import llnl.util.lang
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ def test_module_suffixes(module_suffixes_schema):
|
|||||||
["compilers", "config", "env", "merged", "mirrors", "modules", "packages", "repos"],
|
["compilers", "config", "env", "merged", "mirrors", "modules", "packages", "repos"],
|
||||||
)
|
)
|
||||||
def test_schema_validation(meta_schema, config_name):
|
def test_schema_validation(meta_schema, config_name):
|
||||||
import importlib # novm
|
import importlib
|
||||||
|
|
||||||
module_name = "spack.schema.{0}".format(config_name)
|
module_name = "spack.schema.{0}".format(config_name)
|
||||||
module = importlib.import_module(module_name)
|
module = importlib.import_module(module_name)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
"""Simple wrapper around JSON to guarantee consistent use of load/dump. """
|
"""Simple wrapper around JSON to guarantee consistent use of load/dump. """
|
||||||
import json
|
import json
|
||||||
from typing import Any, Dict, Optional # novm
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
import spack.error
|
import spack.error
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
import io
|
import io
|
||||||
import re
|
import re
|
||||||
from typing import List # novm
|
from typing import List
|
||||||
|
|
||||||
import ruamel.yaml as yaml
|
import ruamel.yaml as yaml
|
||||||
from ruamel.yaml import RoundTripDumper, RoundTripLoader
|
from ruamel.yaml import RoundTripDumper, RoundTripLoader
|
||||||
|
Loading…
Reference in New Issue
Block a user