Skip to content
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 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ python:
path: .
extra_requirements:
- doc

sphinx:
configuration: docs/conf.py
6 changes: 5 additions & 1 deletion rope/base/oi/type_hinting/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import logging
import sys
from typing import TYPE_CHECKING, Optional, Union

import rope.base.utils as base_utils
Expand Down Expand Up @@ -81,7 +82,10 @@
"""
Find proper type object from its name.
"""
deprecated_aliases = {"collections": "collections.abc"}
if sys.version_info < (3, 13):
deprecated_aliases = {"collections": "collections.abc"}
else:
deprecated_aliases = {"collections": "_collections_abc"}

Check warning on line 88 in rope/base/oi/type_hinting/utils.py

View check run for this annotation

Codecov / codecov/patch

rope/base/oi/type_hinting/utils.py#L88

Added line #L88 was not covered by tests
ret_type = None
logging.debug("Looking for %s", type_name)
if "." not in type_name:
Expand Down
19 changes: 11 additions & 8 deletions rope/contrib/autoimport/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,17 @@
return list(OrderedDict.fromkeys(folder_paths))

def _safe_iterdir(self, folder: Path):
dirs = folder.iterdir()
while True:
try:
yield next(dirs)
except PermissionError:
pass
except StopIteration:
break
try:
dirs = folder.iterdir()
while True:
try:
yield next(dirs)
except PermissionError:
pass
except StopIteration:
break
except PermissionError:
pass

Check warning on line 582 in rope/contrib/autoimport/sqlite.py

View check run for this annotation

Codecov / codecov/patch

rope/contrib/autoimport/sqlite.py#L582

Added line #L582 was not covered by tests

def _get_available_packages(self) -> List[Package]:
packages: List[Package] = [
Expand Down
2 changes: 1 addition & 1 deletion rope/contrib/autoimport/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def sort_and_deduplicate(results: List[Tuple[str, int]]) -> List[str]:


def sort_and_deduplicate_tuple(
results: List[Tuple[str, str, int]]
results: List[Tuple[str, str, int]],
) -> List[Tuple[str, str]]:
"""Sort and deduplicate a list of name, module, source entries."""
results = sorted(results, key=lambda y: y[-1])
Expand Down
2 changes: 1 addition & 1 deletion rope/refactor/importutils/module_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _get_unbound_names(self, defined_pyobject):

def _get_all_star_list(self, pymodule):
def _resolve_name(
name: Union[pynamesdef.AssignedName, pynames.ImportedName]
name: Union[pynamesdef.AssignedName, pynames.ImportedName],
) -> List:
while isinstance(name, pynames.ImportedName):
try:
Expand Down
Loading