diff --git a/nibabel/casting.py b/nibabel/casting.py index 042a2f415..b27932547 100644 --- a/nibabel/casting.py +++ b/nibabel/casting.py @@ -51,11 +51,11 @@ class CastingError(Exception): getattr(np, dtype) for dtype in ( 'int8', 'byte', 'int16', 'short', 'int32', 'intc', 'int_', 'int64', 'longlong', - 'uint8', 'ubyte', 'uint16', 'ushort', 'uint32', 'uintc', 'uint', 'uint64', 'ulonglong', # noqa: E501 - 'float16', 'half', 'float32', 'single', 'float64', 'double', 'float96', 'float128', 'longdouble', # noqa: E501 - 'complex64', 'csingle', 'complex128', 'cdouble', 'complex192', 'complex256', 'clongdouble', # noqa: E501 + 'uint8', 'ubyte', 'uint16', 'ushort', 'uint32', 'uintc', 'uint', 'uint64', 'ulonglong', + 'float16', 'half', 'float32', 'single', 'float64', 'double', 'float96', 'float128', 'longdouble', + 'complex64', 'csingle', 'complex128', 'cdouble', 'complex192', 'complex256', 'clongdouble', # other names of the built-in scalar types - 'int_', 'float_', 'complex_', 'bytes_', 'str_', 'bool_', 'datetime64', 'timedelta64', # noqa: E501 + 'int_', 'float_', 'complex_', 'bytes_', 'str_', 'bool_', 'datetime64', 'timedelta64', # other 'object_', 'void', ) diff --git a/nibabel/info.py b/nibabel/info.py index d7873de21..87727cab1 100644 --- a/nibabel/info.py +++ b/nibabel/info.py @@ -108,4 +108,4 @@ .. _Digital Object Identifier: https://en.wikipedia.org/wiki/Digital_object_identifier .. _zenodo: https://zenodo.org -""" # noqa: E501 +""" diff --git a/nibabel/parrec.py b/nibabel/parrec.py index 8b3ffb34a..0a2005835 100644 --- a/nibabel/parrec.py +++ b/nibabel/parrec.py @@ -6,8 +6,6 @@ # copyright and license terms. # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## -# Disable line length checking for PAR fragments in module docstring -# noqa: E501 """Read images in PAR/REC format This is yet another MRI image format generated by Philips scanners. It is an diff --git a/pyproject.toml b/pyproject.toml index e865cd009..9b5815e33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -131,18 +131,19 @@ select = [ "PYI", "Q", "RSE", + "RUF", "TCH", "UP", ] ignore = [ - "B006", # TODO: enable - "B008", # TODO: enable + "B006", # TODO: enable + "B008", # TODO: enable "B007", "B011", - "B017", # TODO: enable + "B017", # TODO: enable "B018", "B020", - "B023", # TODO: enable + "B023", # TODO: enable "B028", "B904", "C401", @@ -157,6 +158,10 @@ ignore = [ "PT017", "PT018", "PYI024", + "RUF005", + "RUF012", # TODO: enable + "RUF015", + "RUF017", # TODO: enable # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "W191", "E111",