Skip to content

Commit

Permalink
Dependency update after v2.3.0 (#3596)
Browse files Browse the repository at this point in the history
* Bump ruff from 0.5.5 to 0.5.6 (#3501)

* Bump ruff from 0.5.5 to 0.5.6

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.5.5...0.5.6)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🚨 Ruff v0.5.6 update

* 🏷️ Fix parameterframe typing location

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Bump ruff from 0.5.6 to 0.5.7 (#3513)

* Bump ruff from 0.5.6 to 0.5.7

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.5.6...0.5.7)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🚨 Ruff 0.5.7 fixes

* 🐛 Py3.10 failure

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Bump pytools from 2024.1.12 to 2024.1.13 (#3538)

Bumps [pytools](https://github.com/inducer/pytools) from 2024.1.12 to 2024.1.13.
- [Release notes](https://github.com/inducer/pytools/releases)
- [Commits](inducer/pytools@v2024.1.12...v2024.1.13)

---
updated-dependencies:
- dependency-name: pytools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pybind11-global from 2.13.1 to 2.13.4 (#3537)

Bumps [pybind11-global](https://github.com/pybind/pybind11) from 2.13.1 to 2.13.4.
- [Release notes](https://github.com/pybind/pybind11/releases)
- [Changelog](https://github.com/pybind/pybind11/blob/master/docs/changelog.rst)
- [Commits](pybind/pybind11@v2.13.1...v2.13.4)

---
updated-dependencies:
- dependency-name: pybind11-global
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pybind11 from 2.13.1 to 2.13.4 (#3543)

Bumps [pybind11](https://github.com/pybind/pybind11) from 2.13.1 to 2.13.4.
- [Release notes](https://github.com/pybind/pybind11/releases)
- [Changelog](https://github.com/pybind/pybind11/blob/master/docs/changelog.rst)
- [Commits](pybind/pybind11@v2.13.1...v2.13.4)

---
updated-dependencies:
- dependency-name: pybind11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ruff from 0.5.7 to 0.6.1 (#3546)

* Bump ruff from 0.5.7 to 0.6.1

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.5.7 to 0.6.1.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.5.7...0.6.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🚨 Ruff 0.6.0 fixes

* 🚨 Ruff 0.6.1 fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Bump ruff from 0.6.1 to 0.6.2 (#3552)

* Bump ruff from 0.6.1 to 0.6.2

Dependabot couldn't find the original pull request head commit, 201712e.

* 🚨 Ruff 0.6.2 fixes

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Bump pybind11 from 2.13.4 to 2.13.5 (#3551)

Dependabot couldn't find the original pull request head commit, a4fbc94.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pybind11-global from 2.13.4 to 2.13.5 (#3562)

Bumps [pybind11-global](https://github.com/pybind/pybind11) from 2.13.4 to 2.13.5.
- [Release notes](https://github.com/pybind/pybind11/releases)
- [Changelog](https://github.com/pybind/pybind11/blob/master/docs/changelog.rst)
- [Commits](pybind/pybind11@v2.13.4...v2.13.5)

---
updated-dependencies:
- dependency-name: pybind11-global
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Sub-dependency update (#3563)

* 🐛 Test

* Updated transient dependencies

* 💚 Force a new cmake version

---------

Co-authored-by: james <james.cook1@ukaea.uk>

* 👷 Add dependabot helper CI (#3566)

* Bump ruff from 0.6.2 to 0.6.3 (#3567)

* Bump ruff from 0.6.2 to 0.6.3

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.6.2...0.6.3)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* 💚 Fix CI helper

* Updated dependencies in requirements files

* 🚨 Ruff 0.6.3 fixes

* 💚 Protect against nothing to do

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>

* Updated transient dependencies (#3568)

* Bump pytools from 2024.1.13 to 2024.1.14 (#3592)

Bumps [pytools](https://github.com/inducer/pytools) from 2024.1.13 to 2024.1.14.
- [Release notes](https://github.com/inducer/pytools/releases)
- [Commits](inducer/pytools@v2024.1.13...v2024.1.14)

---
updated-dependencies:
- dependency-name: pytools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ruff from 0.6.3 to 0.6.4 (#3593)

* Bump ruff from 0.6.3 to 0.6.4

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.3 to 0.6.4.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.6.3...0.6.4)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Updated dependencies in requirements files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Updated transient dependencies (#3595)

* 🎨 Minor formatting fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: james <james.cook1@ukaea.uk>
Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 10, 2024
1 parent da1df5f commit 3567a3b
Show file tree
Hide file tree
Showing 86 changed files with 489 additions and 181 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/actions/process/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ runs:
shell: bash -l {0}
run: |
cd bluemira/process
pip install -U cmake
pip install -U 'setuptools<74'
cmake -G Ninja -S . -B build -DRELEASE=TRUE
cmake --build build
46 changes: 46 additions & 0 deletions .github/workflows/dependabot_helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Dependabot helper
on: pull_request

permissions:
pull-requests: write
issues: write
repository-projects: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'Fusion-Power-Plant-Framework/bluemira'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}

- name: Run uv
shell: bash
run: |
python -m pip install --upgrade pip
pip install uv
uv pip compile pyproject.toml --python-version=3.10 --extra pinned -o requirements/uv/base.txt
uv pip compile pyproject.toml --python-version=3.10 --extra pinned -o requirements/uv/develop.txt --extra dev
uv pip compile pyproject.toml --python-version=3.10 --extra pinned -o requirements/uv/examples.txt --extra examples
uv pip compile pyproject.toml --python-version=3.10 --extra pinned -o requirements/uv/all.txt --extra dev --extra polyscope --extra radiation --extra examples
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
git config user.name "dependabot[bot]"
git add requirements
if [[ -n $(git status --porcelain) ]] ; then
git commit -m "Updated dependencies in requirements files"
git push
fi
14 changes: 12 additions & 2 deletions .github/workflows/pin_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: 3.10
python-version: "3.10"

- name: Run uv
id: uv
env:
GITHUB_TOKEN: ${{ secrets.FPPF_BOT_AUTH_KEY }}
shell: bash
Expand All @@ -37,11 +38,20 @@ jobs:
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/develop.txt --extra dev
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/examples.txt --extra examples
uv pip compile pyproject.toml --upgrade --python-version=3.10 --extra pinned -o requirements/uv/all.txt --extra dev --extra polyscope --extra radiation --extra examples
git config user.email "107038218+fppf-bot@users.noreply.github.com"
git config user.name "fppf-bot"
git checkout -b fppf/sub_dependencies
git add requirements
git commit -S -m "Updated transient dependencies"
if [[ -n $(git status --porcelain) ]] ; then
git commit -m "Updated transient dependencies"
git push --set-upstream origin fppf/sub_dependencies
echo new_commit='1' >> $GITHUB_OUTPUT
else
echo new_commit='' >> $GITHUB_OUTPUT
fi
- name: Create PR to update transient dependencies
if: steps.uv.outputs.new_commit != ''
env:
GITHUB_TOKEN: ${{ secrets.FPPF_BOT_AUTH_KEY }}
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
exclude: test_data

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
rev: v0.6.4
hooks:
- id: ruff
args: [--fix]
Expand Down
3 changes: 2 additions & 1 deletion bluemira/balance_of_plant/steady_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if TYPE_CHECKING:
from collections.abc import Iterable

from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike


CoolantPumpingT = TypeVar("CoolantPumpingT", bound="CoolantPumping")
Expand Down Expand Up @@ -437,6 +437,7 @@ def calculate(*args, **kwargs) -> tuple[float, float, float, float]:
p_other:
Parasitic loads to power other miscellaneous things
"""
...


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion bluemira/base/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

if TYPE_CHECKING:
from bluemira.base.components import ComponentT
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike

BuildConfig: TypeAlias = dict[str, Union[int, float, str, "BuildConfig"]]
"""
Expand Down
4 changes: 0 additions & 4 deletions bluemira/base/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ def add_child(self, child: Component):
child:
The child to be added
Returns
-------
This component.
Raises
------
ComponentError
Expand Down
2 changes: 1 addition & 1 deletion bluemira/base/designer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from collections.abc import Callable

from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike, ParameterFrameT
from bluemira.base.parameter_frame.typed import ParameterFrameLike, ParameterFrameT

_DesignerReturnT = TypeVar("_DesignerReturnT")

Expand Down
11 changes: 8 additions & 3 deletions bluemira/base/parameter_frame/_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
)

if TYPE_CHECKING:
from collections.abc import Generator, Iterable
from collections.abc import Iterable, Iterator
from types import GenericAlias

from bluemira.base.parameter_frame.typing import ParameterFrameLike, ParameterFrameT
from bluemira.base.parameter_frame.typed import ParameterFrameLike, ParameterFrameT
from bluemira.base.reactor_config import ConfigParams


Expand Down Expand Up @@ -121,12 +121,17 @@ def _get_types(cls) -> dict[str, GenericAlias]:
frame_type_hints = get_type_hints(cls)
return {f.name: frame_type_hints[f.name] for f in fields(cls)}

def __iter__(self) -> Generator[Parameter, None, None]:
def __iter__(self) -> Iterator[Parameter]:
"""
Iterate over this frame's parameters.
The order is based on the order in which the parameters were
declared.
Yields
------
:
Each parameter in the frame
"""
for field in fields(self):
yield getattr(self, field.name)
Expand Down
2 changes: 2 additions & 0 deletions bluemira/base/parameter_frame/_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def value_as(self, unit: str | pint.Unit) -> ParameterValueType | None:
------
ValueError
Unit conversion failed
TypeError
If the wrong unit type is passed in
Notes
-----
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions bluemira/base/reactor_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from collections.abc import Iterable

from bluemira.base.parameter_frame._parameter import ParamDictT
from bluemira.base.parameter_frame.typing import ParameterFrameT
from bluemira.base.parameter_frame.typed import ParameterFrameT


@dataclass
Expand Down Expand Up @@ -329,7 +329,7 @@ def _extract(self, arg_keys: tuple[str], *, is_config: bool = True) -> dict:

for next_idx, current_arg_key in enumerate(arg_keys, start=1):
current_layer = current_layer.get(current_arg_key, {})
next_arg_key = arg_keys[next_idx] if next_idx < len(arg_keys) else None # noqa: PLR1736
next_arg_key = arg_keys[next_idx] if next_idx < len(arg_keys) else None

to_extract = current_layer
if not is_config:
Expand Down
4 changes: 2 additions & 2 deletions bluemira/builders/coil_supports.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@

if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.optimisation.typing import ConstraintT
from bluemira.base.parameter_frame.typed import ParameterFrameLike
from bluemira.optimisation import ConstraintT


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion bluemira/builders/cryostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from bluemira.geometry.tools import make_polygon

if TYPE_CHECKING:
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion bluemira/builders/divertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike
from bluemira.geometry.face import BluemiraFace


Expand Down
2 changes: 1 addition & 1 deletion bluemira/builders/pf_coil.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike
from bluemira.geometry.wire import BluemiraWire


Expand Down
2 changes: 1 addition & 1 deletion bluemira/builders/plasma.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike
from bluemira.geometry.wire import BluemiraWire


Expand Down
2 changes: 1 addition & 1 deletion bluemira/builders/radiation_shield.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike


@dataclass
Expand Down
4 changes: 2 additions & 2 deletions bluemira/builders/tf_coils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
from bluemira.optimisation import optimise

if TYPE_CHECKING:
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.geometry.optimisation.typing import GeomConstraintT
from bluemira.base.parameter_frame.typed import ParameterFrameLike
from bluemira.geometry.optimisation import GeomConstraintT
from bluemira.geometry.parameterisations import GeometryParameterisation
from bluemira.geometry.wire import BluemiraWire

Expand Down
2 changes: 1 addition & 1 deletion bluemira/builders/thermal_shield.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame.typing import ParameterFrameLike
from bluemira.base.parameter_frame.typed import ParameterFrameLike
from bluemira.geometry.wire import BluemiraWire


Expand Down
9 changes: 7 additions & 2 deletions bluemira/codes/_freecadapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import math
import os
import sys
from collections.abc import Callable, Iterable
from collections.abc import Callable, Iterable, Iterator
from dataclasses import asdict, dataclass
from functools import wraps
from pathlib import Path
Expand Down Expand Up @@ -1225,7 +1225,7 @@ def _setup_document(
labels: Iterable[str] | None = None,
*,
rotate: bool = False,
) -> Iterable[Part.Feature]:
) -> Iterator[Part.Feature]:
"""
Setup FreeCAD document.
Expand All @@ -1236,6 +1236,11 @@ def _setup_document(
ValueError
Number of objects not equal to number of labels
Yields
------
:
Each document object
Notes
-----
TODO the rotate flag should be removed. We should fix it in the camera of the viewer
Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions bluemira/codes/process/_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Parameter classes/structures for Process
"""

from collections.abc import Generator
from collections.abc import Iterator
from dataclasses import dataclass, fields

from bluemira.codes.process.api import _INVariable
Expand Down Expand Up @@ -703,12 +703,17 @@ class ProcessInputs:
ims: int | None = None
ifci: int | None = None

def __iter__(self) -> Generator[tuple[str, float | list | dict], None, None]:
def __iter__(self) -> Iterator[tuple[str, float | list | dict]]:
"""
Iterate over this dataclass
The order is based on the order in which the values were
declared.
Yields
------
:
the field name and its value
"""
for _field in fields(self):
yield _field.name, getattr(self, _field.name)
Expand Down
4 changes: 2 additions & 2 deletions bluemira/codes/process/_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def read_rb_line(line: str):
if i > 0:
line[0] = " ".join([line[0], v]) # noqa: B909
elif is_num(v) is True:
line[1] = float(v) # noqa: B909
line[2] = float(line[i + 1]) # noqa: B909
line[1] = float(v)
line[2] = float(line[i + 1])
return line[:3]
return None

Expand Down
3 changes: 2 additions & 1 deletion bluemira/codes/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
if TYPE_CHECKING:
from bluemira.base.builder import BuildConfig
from bluemira.base.parameter_frame import Parameter as ParameterFrame
from bluemira.codes._typing import TransportSolver
from bluemira.codes.interface import CodesSolver
from bluemira.codes.params import MappedParameterFrame

Expand Down Expand Up @@ -86,7 +87,7 @@ def transport_code_solver(
params: ParameterFrame,
build_config: BuildConfig,
module: str = "PLASMOD",
) -> CodesSolver:
) -> TransportSolver:
"""
Transport solver
Expand Down
5 changes: 3 additions & 2 deletions bluemira/display/auto_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import functools
import os
import sys
from multiprocessing import Pool, TimeoutError
from multiprocessing import Pool
from multiprocessing import TimeoutError as mpTimeoutError

import numpy as np
import seaborn as sns
Expand Down Expand Up @@ -44,7 +45,7 @@ def get_primary_screen_size(timeout: float = 3):
result = pool.apply_async(_get_primary_screen_size)
try:
val = result.get(timeout=timeout)
except TimeoutError:
except mpTimeoutError:
pool.terminate()
bluemira_warn(
"Unable to get screensize, please check your X server."
Expand Down
Loading

0 comments on commit 3567a3b

Please sign in to comment.