Skip to content

Commit

Permalink
Merge pull request #1730 from pyiron/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
jan-janssen authored Jan 14, 2025
2 parents 20a33c9 + d067c6f commit 7fcd374
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
name: ruff lint
Expand Down
2 changes: 1 addition & 1 deletion pyiron_base/cli/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main() -> None:
mod.register(sub_parser)
except AttributeError:
warnings.warn(
"module '{}' does not define main or register " "function, ignoring"
"module '{}' does not define main or register function, ignoring"
)

args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion pyiron_base/jobs/master/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def run_if_refresh(self):
Internal helper function the run if refresh function is called when the job status is 'refresh'. If the job was
suspended previously, the job is going to be started again, to be continued.
"""
log_str = "{}, status: {}, finished: {} parallel master " "refresh".format(
log_str = "{}, status: {}, finished: {} parallel master refresh".format(
self.job_info_str, self.status, self.is_finished()
)
self._logger.info(log_str)
Expand Down
2 changes: 1 addition & 1 deletion pyiron_base/jobs/master/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def run_if_refresh(self):
Internal helper function the run if refresh function is called when the job status is 'refresh'. If the job was
suspended previously, the job is going to be started again, to be continued.
"""
log_str = "{}, status: {}, finished: {} parallel master " "refresh".format(
log_str = "{}, status: {}, finished: {} parallel master refresh".format(
self.job_info_str, self.status, self.is_finished()
)
self._logger.info(log_str)
Expand Down
2 changes: 1 addition & 1 deletion pyiron_base/storage/flattenedstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def read_array(name, hdf):
# itemsize of original a is four bytes per character, so divide by four to get
# length of the orignal stored unicode string; np.dtype('U1').itemsize is just a
# platform agnostic way of knowing how wide a unicode charater is for numpy
dtype=f"U{a.dtype.itemsize//np.dtype('U1').itemsize}",
dtype=f"U{a.dtype.itemsize // np.dtype('U1').itemsize}",
)
return a

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/database/test_database_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_get_items_sql(self):
# be sure that get_items_sql returns right result with right statement
result = self.database.get_items_sql(
where_condition="",
sql_statement="select * from simulation " "where id=%s" % key,
sql_statement="select * from simulation where id=%s" % key,
)[-1]
self.assertTrue(par_dict.items() <= result.items())

Expand Down
9 changes: 4 additions & 5 deletions tests/unit/job/test_jobtypechoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_attr(self):
getattr(self.jobtypechoice, k)
except AttributeError:
self.fail(
"job class {} in JOB_CLASS_DICT, but not on " "JobTypeChoice".format(k)
"job class {} in JOB_CLASS_DICT, but not on JobTypeChoice".format(k)
)

def test_extend_job_class_dict(self):
Expand All @@ -44,14 +44,13 @@ def test_extend_job_class_dict(self):
JOB_CLASS_DICT["TestClass"] = "my.own.test.module"
self.assertTrue(
"TestClass" in dir(self.jobtypechoice),
"new job class added to JOB_CLASS_DICT, but not " "returned in dir()",
"new job class added to JOB_CLASS_DICT, but not returned in dir()",
)
try:
getattr(self.jobtypechoice, "TestClass")
except AttributeError:
self.fail(
"new job class added to JOB_CLASS_DICT, but not defined "
"JobTypeChoice"
"new job class added to JOB_CLASS_DICT, but not defined JobTypeChoice"
)


Expand Down Expand Up @@ -81,5 +80,5 @@ def test_attr(self):
getattr(self.job_factory, k)
except AttributeError:
self.fail(
"job class {} in JOB_CLASS_DICT, but not on " "JobTypeChoice".format(k)
"job class {} in JOB_CLASS_DICT, but not on JobTypeChoice".format(k)
)
3 changes: 1 addition & 2 deletions tests/unit/project/test_jobloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def test_load(self):
self.assertEqual(
len(self.project.job_table()),
len(self.project.load.__dir__()),
msg="Tab completion (`__dir__`) should see both jobs at this project "
"level",
msg="Tab completion (`__dir__`) should see both jobs at this project level",
# Note: When job names are duplicated at different sub-project levels, the
# job name occurs in the __dir__ multiple times, even though it will only
# show up in the tab-completion menu once (where it accesses the top-most
Expand Down

0 comments on commit 7fcd374

Please sign in to comment.