Skip to content

Commit f2c721e

Browse files
committed
🔧 Apply pyupgrade --py310-plus (aiidateam#120)
1 parent b399d5a commit f2c721e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/validate_release_tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_version_from_module(content: str) -> str:
1313
try:
1414
module = ast.parse(content)
1515
except SyntaxError as exception:
16-
raise IOError('Unable to parse module.') from exception
16+
raise OSError('Unable to parse module.') from exception
1717

1818
try:
1919
return next(
@@ -24,7 +24,7 @@ def get_version_from_module(content: str) -> str:
2424
if isinstance(target, ast.Name) and target.id == '__version__'
2525
)
2626
except StopIteration as exception:
27-
raise IOError('Unable to find the `__version__` attribute in the module.') from exception
27+
raise OSError('Unable to find the `__version__` attribute in the module.') from exception
2828

2929

3030
if __name__ == '__main__':

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def factory(
8888
manager = get_manager()
8989
runner = manager.get_runner()
9090

91-
process_class: t.Type['CalcJob'] = CalculationFactory(entry_point_name) # type: ignore[assignment]
91+
process_class: t.Type[CalcJob] = CalculationFactory(entry_point_name) # type: ignore[assignment]
9292
process: CalcJob = instantiate_process(runner, process_class, **inputs or {}) # type: ignore[assignment]
9393

9494
if presubmit:

0 commit comments

Comments
 (0)