Skip to content

Commit 1605a74

Browse files
authored
switch linting to ruff (#1241)
1 parent b259bfb commit 1605a74

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- {VERSION: "3.11", TOXENV: "py311-twistedTrunk"}
4343
# Meta
4444
- {VERSION: "3.9", TOXENV: "check-manifest"}
45-
- {VERSION: "3.9", TOXENV: "flake8"}
45+
- {VERSION: "3.11", TOXENV: "lint"}
4646
- {VERSION: "3.11", TOXENV: "py311-mypy"}
4747
- {VERSION: "3.9", TOXENV: "docs"}
4848
name: "${{ matrix.PYTHON.TOXENV }}${{ matrix.PYTHON.OS && format(' on {0}', matrix.PYTHON.OS) || '' }}"

src/OpenSSL/crypto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def __setattr__(self, name: str, value: Any) -> None:
606606

607607
# Note: we really do not want str subclasses here, so we do not use
608608
# isinstance.
609-
if type(name) is not str:
609+
if type(name) is not str: # noqa: E721
610610
raise TypeError(
611611
"attribute name must be string, not '%.200s'"
612612
% (type(value).__name__,)

tox.ini

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{py,py3,37,38,39,310,311}{,-cryptographyMinimum}{,-useWheel}{,-randomorder},py311-twistedTrunk,check-manifest,flake8,py311-mypy,docs,coverage-report
2+
envlist = py{py,py3,37,38,39,310,311}{,-cryptographyMinimum}{,-useWheel}{,-randomorder},py311-twistedTrunk,check-manifest,lint,py311-mypy,docs,coverage-report
33

44
[testenv]
55
allowlist_externals =
@@ -41,16 +41,15 @@ commands =
4141
python -m OpenSSL.debug
4242
python -m twisted.trial -j4 --reporter=text twisted
4343

44-
[testenv:flake8]
44+
[testenv:lint]
4545
basepython = python3
4646
deps =
4747
black
48-
flake8
49-
flake8-import-order
48+
ruff==0.0.284
5049
skip_install = true
5150
commands =
5251
black --check .
53-
flake8 .
52+
ruff .
5453

5554
[testenv:py311-mypy]
5655
deps =
@@ -78,7 +77,3 @@ skip_install = true
7877
commands =
7978
coverage combine
8079
coverage report
81-
82-
[flake8]
83-
application-import-names = OpenSSL
84-
ignore = E203,W503,W504

0 commit comments

Comments
 (0)