Skip to content

Commit 365b7df

Browse files
committed
Merge branch 'nowa-809' into lieryan-update-python-actions-versions
2 parents 9064a97 + 90e2451 commit 365b7df

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

rope/base/oi/type_hinting/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import logging
4+
import sys
45
from typing import TYPE_CHECKING, Optional, Union
56

67
import rope.base.utils as base_utils
@@ -81,7 +82,10 @@ def resolve_type(
8182
"""
8283
Find proper type object from its name.
8384
"""
84-
deprecated_aliases = {"collections": "collections.abc"}
85+
if sys.version_info < (3, 13):
86+
deprecated_aliases = {"collections": "collections.abc"}
87+
else:
88+
deprecated_aliases = {"collections": "_collections_abc"}
8589
ret_type = None
8690
logging.debug("Looking for %s", type_name)
8791
if "." not in type_name:

rope/contrib/autoimport/sqlite.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,17 @@ def filter_folders(folder: Path) -> bool:
569569
return list(OrderedDict.fromkeys(folder_paths))
570570

571571
def _safe_iterdir(self, folder: Path):
572-
dirs = folder.iterdir()
573-
while True:
574-
try:
575-
yield next(dirs)
576-
except PermissionError:
577-
pass
578-
except StopIteration:
579-
break
572+
try:
573+
dirs = folder.iterdir()
574+
while True:
575+
try:
576+
yield next(dirs)
577+
except PermissionError:
578+
pass
579+
except StopIteration:
580+
break
581+
except PermissionError:
582+
pass
580583

581584
def _get_available_packages(self) -> List[Package]:
582585
packages: List[Package] = [

0 commit comments

Comments
 (0)