File tree Expand file tree Collapse file tree 5 files changed +28
-24
lines changed
Expand file tree Collapse file tree 5 files changed +28
-24
lines changed Original file line number Diff line number Diff line change @@ -99,3 +99,6 @@ runtime/
9999
100100# IntelliJ Idea family of suites
101101.idea
102+
103+ # Ruff linter cache files
104+ .ruff_cache
Original file line number Diff line number Diff line change 88 - id : check-docstring-first
99 - id : end-of-file-fixer
1010 - id : trailing-whitespace
11- - repo : https://github.com/PyCQA/isort
12- # For split_on_trailing_comma. Should be in the release after 5.10.1
13- rev : 6.0.1
14- hooks :
15- - id : isort
16- additional_dependencies : [toml]
1711 - repo : https://github.com/asottile/pyupgrade
1812 rev : v3.20.0
1913 hooks :
2014 - id : pyupgrade
2115 args : [--py38-plus]
22- - repo : https://github.com/psf/black-pre-commit-mirror
23- rev : 25.9.0
24- hooks :
25- - id : black
26- language_version : python3
27- - repo : https://github.com/PyCQA/flake8
28- rev : 7.3.0
16+ - repo : https://github.com/astral-sh/ruff-pre-commit
17+ rev : v0.11.13
2918 hooks :
30- - id : flake8
19+ - id : ruff-check
20+ args : [ --fix ]
21+ - id : ruff-format
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ class CFTypeRef(ctypes.c_void_p):
3737CoreFoundation .CFRelease .restype = None
3838CoreFoundation .CFRelease .argtypes = [CFTypeRef ]
3939
40- # CFStringRef CFStringCreateWithCharacters(CFAllocatorRef alloc, const UniChar *chars, CFIndex numChars)
40+ # CFStringRef CFStringCreateWithCharacters(
41+ # CFAllocatorRef alloc, const UniChar *chars, CFIndex numChars
42+ # )
4143CoreFoundation .CFStringCreateWithCharacters .restype = CFTypeRef
4244CoreFoundation .CFStringCreateWithCharacters .argtypes = [
4345 CFTypeRef ,
Original file line number Diff line number Diff line change 22requires = [" setuptools>=60" ]
33build-backend = " setuptools.build_meta"
44
5- [tool .isort ]
6- profile = " black"
7- split_on_trailing_comma = true
8- combine_as_imports = true
5+ [tool .ruff .lint ]
6+ # In addition to the default rules, these additional rules will be used:
7+ extend-select = [
8+ " E" , # pycodestyle
9+ " W" , # pycodestyle
10+ " F" , # pyflakes
11+ " UP" , # pyupgrade
12+ " B" , # flake8-bugbear
13+ " YTT" , # flake8-2020
14+ " ASYNC" , # flake8-async
15+ " C4" , # flake8-comprehensions
16+ " I" , # isort
17+ # The SIM rules are *very* opinionated, and don't necessarily make for better code.
18+ # They may be worth occasionally turning on just to see if something could actually
19+ # use improvement.
20+ # "SIM", # flake8-simplify
21+ ]
Original file line number Diff line number Diff line change @@ -42,8 +42,3 @@ platforms = any
4242[options]
4343py_modules = nslog
4444python_requires = >= 3.7
45-
46- [flake8]
47- max-complexity = 25
48- max-line-length = 119
49- ignore = E203
You can’t perform that action at this time.
0 commit comments