Skip to content

Commit 91301dc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6e31e59 commit 91301dc

11 files changed

Lines changed: 17 additions & 19 deletions

File tree

.ruff.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ ignore = [
4444
"src/stpipe/cmdline.py" = [
4545
"T201",
4646
]
47-
48-

src/stpipe/_cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def step_from_cmdline(args):
498498
)
499499

500500
if known.debug:
501-
import pdb # noqa: T100
501+
import pdb
502502

503503
pdb.post_mortem()
504504
else:

src/stpipe/_log.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# LOGS AS EXCEPTIONS
3737

3838

39-
class LoggedException(Exception): # noqa: N818
39+
class LoggedException(Exception):
4040
"""
4141
This is an exception used when a log record is converted into an
4242
exception.
@@ -85,14 +85,14 @@ def __init__(
8585
break_level=logging.NOTSET,
8686
recording_level=logging.NOTSET,
8787
recording_formatter=None,
88-
format=None, # noqa: A002
88+
format=None,
8989
):
9090
if isinstance(handler, str):
9191
handler = handler.strip().split(",")
9292
self.handlers = [self.get_handler(x.strip()) for x in handler]
9393
self.level = level
9494
if format is None:
95-
format = DEFAULT_FORMAT # noqa: A001
95+
format = DEFAULT_FORMAT
9696
self.format = logging.Formatter(format)
9797
for handler in self.handlers:
9898
handler.setLevel(self.level)

src/stpipe/crds_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
from crds.core.exceptions import CrdsError
1212

1313
__all__ = [
14-
"check_reference_open",
1514
"CrdsError",
15+
"check_reference_open",
16+
"get_context_used",
1617
"get_multiple_reference_paths",
1718
"get_override_name",
1819
"get_reference_file",
1920
"get_svn_version",
2021
"reference_uri_to_cache_path",
21-
"get_context_used",
2222
]
2323

2424

src/stpipe/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
class StpipeException(Exception): # noqa: N818
1+
class StpipeException(Exception):
22
"""
33
Base class for exceptions from the stpipe package.
44
"""

src/stpipe/format_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def format(self, format_string, **kwargs):
184184
# Make the instance callable
185185
__call__ = format
186186

187-
def get_value(self, key, args, kwargs): # noqa: ARG002
187+
def get_value(self, key, args, kwargs):
188188
"""Return a given field value
189189
190190
Parameters

src/stpipe/library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
from .datamodel import AbstractDataModel
1515

1616
__all__ = [
17-
"LibraryError",
17+
"AbstractModelLibrary",
1818
"BorrowError",
1919
"ClosedLibraryError",
20+
"LibraryError",
2021
"NoGroupID",
21-
"AbstractModelLibrary",
2222
]
2323

2424

src/stpipe/step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ def update_pars(self, parameters):
14201420
)
14211421

14221422
@classmethod
1423-
def build_config(cls, input, **kwargs): # noqa: A002
1423+
def build_config(cls, input, **kwargs):
14241424
"""Build the ConfigObj to initialize a Step
14251425
14261426
A Step config is built in the following order:

tests/steps/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class WithDefaultsStep(BaseStep):
2828
par4 = string(default='default par4 value')
2929
"""
3030

31-
def process(self, input_data): # noqa: D102
31+
def process(self, input_data):
3232
log.info(
3333
"Parameters par1=%s, par2=%s, par3=%s, par4=%s",
3434
self.par1,
@@ -49,7 +49,7 @@ class MakeListStep(BaseStep):
4949
par3 = boolean(default=False) # Does it blend?
5050
"""
5151

52-
def process(self, a=None, b=None): # noqa: D102
52+
def process(self, a=None, b=None):
5353
log.info("Arguments a=%s b=%s", a, b)
5454
log.info(
5555
"Parameters par1=%s, par2=%s, par3=%s", self.par1, self.par2, self.par3
@@ -70,7 +70,7 @@ class EmptyPipeline(BasePipeline):
7070
par1 = string(default='Name the atomizer') # Control the frobulization
7171
"""
7272

73-
def process(self, *args): # noqa: D102
73+
def process(self, *args):
7474
return args
7575

7676

@@ -85,5 +85,5 @@ class MakeListPipeline(BasePipeline):
8585
"make_list": MakeListStep,
8686
}
8787

88-
def process(self, *args): # noqa: D102
88+
def process(self, *args):
8989
return self.make_list.run(*args)

tests/test_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def process(self, input_data):
9999
result = self.shovelpixels.run(input_data)
100100
result = self.cancelnoise.run(result)
101101

102-
return result # noqa: RET504
102+
return result
103103

104104

105105
def hook_function(input_data):

0 commit comments

Comments
 (0)