Skip to content

Commit

Permalink
switch linting to ruff (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperhulk committed Aug 30, 2023
1 parent b259bfb commit 1605a74
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- {VERSION: "3.11", TOXENV: "py311-twistedTrunk"}
# Meta
- {VERSION: "3.9", TOXENV: "check-manifest"}
- {VERSION: "3.9", TOXENV: "flake8"}
- {VERSION: "3.11", TOXENV: "lint"}
- {VERSION: "3.11", TOXENV: "py311-mypy"}
- {VERSION: "3.9", TOXENV: "docs"}
name: "${{ matrix.PYTHON.TOXENV }}${{ matrix.PYTHON.OS && format(' on {0}', matrix.PYTHON.OS) || '' }}"
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSSL/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def __setattr__(self, name: str, value: Any) -> None:

# Note: we really do not want str subclasses here, so we do not use
# isinstance.
if type(name) is not str:
if type(name) is not str: # noqa: E721
raise TypeError(
"attribute name must be string, not '%.200s'"
% (type(value).__name__,)
Expand Down
13 changes: 4 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{py,py3,37,38,39,310,311}{,-cryptographyMinimum}{,-useWheel}{,-randomorder},py311-twistedTrunk,check-manifest,flake8,py311-mypy,docs,coverage-report
envlist = py{py,py3,37,38,39,310,311}{,-cryptographyMinimum}{,-useWheel}{,-randomorder},py311-twistedTrunk,check-manifest,lint,py311-mypy,docs,coverage-report

[testenv]
allowlist_externals =
Expand Down Expand Up @@ -41,16 +41,15 @@ commands =
python -m OpenSSL.debug
python -m twisted.trial -j4 --reporter=text twisted

[testenv:flake8]
[testenv:lint]
basepython = python3
deps =
black
flake8
flake8-import-order
ruff==0.0.284
skip_install = true
commands =
black --check .
flake8 .
ruff .

[testenv:py311-mypy]
deps =
Expand Down Expand Up @@ -78,7 +77,3 @@ skip_install = true
commands =
coverage combine
coverage report

[flake8]
application-import-names = OpenSSL
ignore = E203,W503,W504

0 comments on commit 1605a74

Please sign in to comment.