Skip to content

catch AttrbuteError on typing imports from ironpython #1454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed `SceneObject.frame` to read-only result of `Frame.from_transformation(SceneObject.worldtransformation)`, representing the local coordinate system of the scene object in world coordinates.
* Changed `SceneObject.worldtransformation` to the multiplication of all transformations from the scene object to the root of the scene tree, there will no longer be an additional transformation in relation to the object's frame.
* Fixed call to `astar_shortest_path` in `Graph.shortest_path`.
* Fixed `AttributeError` on certain imports in IronPython.

### Removed

2 changes: 1 addition & 1 deletion src/compas/data/data.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
from typing import TypeVar # noqa: F401

D = TypeVar("D", bound="Data")
except ImportError:
except (ImportError, AttributeError):

Check warning on line 9 in src/compas/data/data.py

Codecov / codecov/patch

src/compas/data/data.py#L9

Added line #L9 was not covered by tests
pass

import hashlib
2 changes: 1 addition & 1 deletion src/compas/data/encoders.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

try:
from typing import Type # noqa: F401
except ImportError:
except (ImportError, AttributeError):

Check warning on line 7 in src/compas/data/encoders.py

Codecov / codecov/patch

src/compas/data/encoders.py#L7

Added line #L7 was not covered by tests
pass

import json
2 changes: 1 addition & 1 deletion src/compas/datastructures/datastructure.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

try:
from typing import TypeVar # noqa: F401
except ImportError:
except (ImportError, AttributeError):

Check warning on line 7 in src/compas/datastructures/datastructure.py

Codecov / codecov/patch

src/compas/datastructures/datastructure.py#L7

Added line #L7 was not covered by tests
pass
else:
G = TypeVar("G", bound="Datastructure")
2 changes: 1 addition & 1 deletion src/compas/geometry/geometry.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

try:
from typing import TypeVar # noqa: F401
except ImportError:
except (ImportError, AttributeError):

Check warning on line 7 in src/compas/geometry/geometry.py

Codecov / codecov/patch

src/compas/geometry/geometry.py#L7

Added line #L7 was not covered by tests
pass
else:
G = TypeVar("G", bound="Geometry")