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

update pre-commit #752

Merged
merged 1 commit into from
Feb 1, 2024
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 24.1.1
hooks:
- id: black
name: black check (Python)

- repo: https://github.com/pycqa/isort
rev: 5.11.3
rev: 5.13.2
hooks:
- id: isort
name: Sort imports (Python)
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
import os
import sys

sys.path.insert(0, os.path.abspath(".."))


Expand Down
1 change: 1 addition & 0 deletions rope/base/project.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import annotations

import contextlib
import json
import os
Expand Down
6 changes: 3 additions & 3 deletions rope/contrib/autoimport/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

import contextlib
import json
from hashlib import sha256
import secrets
import re
import secrets
import sqlite3
import sys
import warnings
from collections import OrderedDict
from concurrent.futures import Future, ProcessPoolExecutor, as_completed
from datetime import datetime
from hashlib import sha256
from itertools import chain
from pathlib import Path
from threading import local
Expand All @@ -21,8 +21,8 @@
from rope.base.resources import Resource
from rope.contrib.autoimport import models
from rope.contrib.autoimport.defs import (
ModuleFile,
Alias,
ModuleFile,
Name,
NameType,
Package,
Expand Down
2 changes: 1 addition & 1 deletion rope/refactor/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import annotations

import typing
from typing import Optional, List, Union
from typing import List, Optional, Union

from rope.base import (
codeanalyze,
Expand Down
5 changes: 3 additions & 2 deletions ropetest/contrib/autoimporttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ def test_skipping_directories_not_accessible_because_of_permission_error(self):
# The single thread test takes much longer than the multithread test but is easier to debug
single_thread = False
self.importer.generate_modules_cache(single_thread=single_thread)

# Create a temporary directory and set permissions to 000
import tempfile, sys
import sys
import tempfile
with tempfile.TemporaryDirectory() as dir:
import os
os.chmod(dir, 0o000)
Expand Down
4 changes: 2 additions & 2 deletions ropetest/refactor/extracttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def xxx_test_raising_exception_on_function_parens(self):
end = code.rindex(")") + 1
with self.assertRaises(rope.base.exceptions.RefactoringError):
self.do_extract_method(code, start, end, "new_func")

def test_raising_exception_on_incomplete_block(self):
code = dedent("""\
if True:
Expand Down Expand Up @@ -1177,7 +1177,7 @@ def test_raising_exception_on_incomplete_block_3(self):
code = dedent("""\
if True:
a = 1

b = 2
""")
start = code.index("if")
Expand Down
Loading