1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Use ruff to check code format intead of black

This commit is contained in:
Jair Henrique
2023-12-10 19:54:12 -03:00
parent 8a8d46f130
commit cebdd45849
4 changed files with 12 additions and 18 deletions

View File

@@ -4,7 +4,7 @@ VCR.py 📼
########### ###########
|PyPI| |Python versions| |Build Status| |CodeCov| |Gitter| |CodeStyleBlack| |PyPI| |Python versions| |Build Status| |CodeCov| |Gitter|
---- ----
@@ -70,6 +70,3 @@ more details
.. |CodeCov| image:: https://codecov.io/gh/kevin1024/vcrpy/branch/master/graph/badge.svg .. |CodeCov| image:: https://codecov.io/gh/kevin1024/vcrpy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/kevin1024/vcrpy :target: https://codecov.io/gh/kevin1024/vcrpy
:alt: Code Coverage Status :alt: Code Coverage Status
.. |CodeStyleBlack| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code Style: black

View File

@@ -1,6 +1,3 @@
[tool.black]
line-length=110
[tool.codespell] [tool.codespell]
skip = '.git,*.pdf,*.svg,.tox' skip = '.git,*.pdf,*.svg,.tox'
ignore-regex = "\\\\[fnrstv]" ignore-regex = "\\\\[fnrstv]"
@@ -8,9 +5,7 @@ ignore-regex = "\\\\[fnrstv]"
# ignore-words-list = '' # ignore-words-list = ''
[tool.pytest.ini_options] [tool.pytest.ini_options]
markers = [ markers = ["online"]
"online",
]
[tool.ruff] [tool.ruff]
select = [ select = [
@@ -30,4 +25,4 @@ line-length = 110
target-version = "py38" target-version = "py38"
[tool.ruff.isort] [tool.ruff.isort]
known-first-party = [ "vcr" ] known-first-party = ["vcr"]

View File

@@ -36,12 +36,10 @@ commands =
[testenv:lint] [testenv:lint]
skipsdist = True skipsdist = True
commands = commands =
black --version
black --check --diff .
ruff --version ruff --version
ruff format --check .
ruff check . ruff check .
deps = deps =
black
ruff ruff
basepython = python3.10 basepython = python3.10

View File

@@ -260,10 +260,14 @@ class CassettePatcherBuilder:
yield cpool, "HTTPConnectionWithTimeout", VCRHTTPConnectionWithTimeout yield cpool, "HTTPConnectionWithTimeout", VCRHTTPConnectionWithTimeout
yield cpool, "HTTPSConnectionWithTimeout", VCRHTTPSConnectionWithTimeout yield cpool, "HTTPSConnectionWithTimeout", VCRHTTPSConnectionWithTimeout
yield cpool, "SCHEME_TO_CONNECTION", { yield (
"http": VCRHTTPConnectionWithTimeout, cpool,
"https": VCRHTTPSConnectionWithTimeout, "SCHEME_TO_CONNECTION",
} {
"http": VCRHTTPConnectionWithTimeout,
"https": VCRHTTPSConnectionWithTimeout,
},
)
@_build_patchers_from_mock_triples_decorator @_build_patchers_from_mock_triples_decorator
def _tornado(self): def _tornado(self):