Skip to content
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

collections.abc replaced collections in python 3.10 #102

Merged
merged 3 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion PyFlow/Core/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ class PFDict(dict):

Only defined data types can be used as keys, and only hashable ones as determined by

>>> isinstance(dataType, collections.Hashable)
>>> isinstance(dataType, collections.abc.Hashable)

To make a class Hashable some methods should be implemented:

Expand Down
3 changes: 1 addition & 2 deletions PyFlow/UI/Canvas/UIConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,7 @@ def paint(self, painter, option, widget):
self.mPath = ConnectionPainter.Cubic(p1, p2, 150, lod)
self.linPath = None
elif editableStyleSheet().ConnectionMode[0] == ConnectionTypes.Linear:
self.mPath = ConnectionPainter.Linear(p1, p2, offset, roundness, lod)
self.linPath = None
self.mPath, self.linPath = ConnectionPainter.Linear(p1, p2, offset, roundness, lod)
if self.snapVToSecond and self.offsetting == 0:
self.vOffset = p2.y() - p1.y()
self.setPath(self.mPath)
Expand Down
2 changes: 1 addition & 1 deletion PyFlow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import importlib
import pkgutil
import collections
import collections.abc as collections
from copy import copy
import os
import json
Expand Down