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:
@@ -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
|
|
||||||
|
|||||||
@@ -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"]
|
||||||
|
|||||||
4
tox.ini
4
tox.ini
@@ -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
|
||||||
|
|
||||||
|
|||||||
12
vcr/patch.py
12
vcr/patch.py
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user