Skip to content
Merged
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
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ extend-select = [
"I", # flake8-isort
"N", # pep8-naming
"NPY", # numpy
"PGH", # pygrep-hooks
"Q", # flake8-quotes
"UP", # pyupgrade
"RUF", # ruff
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle
"TC",
"SIM",
]
extend-ignore = [
"C90", # McCabe complexity
Expand Down
2 changes: 1 addition & 1 deletion pytools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ def wrapper(*args):
return wrapper

if not args:
return _decorator # type: ignore
return _decorator # type: ignore[return-value]
if callable(args[0]) and len(args) == 1:
return _decorator(args[0])
raise TypeError(
Expand Down
11 changes: 5 additions & 6 deletions pytools/mpiwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@

mpi4py.rc.initialize = False

from mpi4py.MPI import * # noqa pylint:disable=wildcard-import,wrong-import-position
from mpi4py.MPI import * # noqa: F403 pylint:disable=wildcard-import,wrong-import-position

import pytools.prefork # pylint:disable=wrong-import-position


pytools.prefork.enable_prefork()


# pylint: disable-next=undefined-variable
if Is_initialized(): # type: ignore[name-defined,unused-ignore] # noqa
if Is_initialized(): # type: ignore[name-defined] # noqa: F405
raise RuntimeError("MPI already initialized before MPI wrapper import")


def InitWithAutoFinalize(*args, **kwargs): # noqa
result = Init(*args, **kwargs) # noqa pylint:disable=undefined-variable
def InitWithAutoFinalize(*args, **kwargs): # noqa: N802
result = Init(*args, **kwargs) # noqa: F405
import atexit
atexit.register(Finalize) # noqa pylint:disable=undefined-variable
atexit.register(Finalize) # # noqa: F405
return result
2 changes: 1 addition & 1 deletion pytools/py_codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from importlib.util import MAGIC_NUMBER as BYTECODE_VERSION
from types import FunctionType, ModuleType

from pytools.codegen import ( # noqa
from pytools.codegen import ( # noqa: F401
CodeGenerator as CodeGeneratorBase,
Indentation,
remove_common_indentation,
Expand Down
Loading