Enable flake8-pie
This commit is contained in:
parent
d02618d173
commit
d1ee6d154f
|
@ -102,6 +102,7 @@ select = [
|
|||
"UP", # pyupgrade
|
||||
"RUF", # ruff
|
||||
"W", # pycodestyle
|
||||
"PIE", # flake8-pie
|
||||
]
|
||||
ignore = [
|
||||
# bugbear ignore
|
||||
|
|
|
@ -452,7 +452,7 @@ class LocalPath:
|
|||
|
||||
def ensure_dir(self, *args):
|
||||
"""Ensure the path joined with args is a directory."""
|
||||
return self.ensure(*args, **{"dir": True})
|
||||
return self.ensure(*args, dir=True)
|
||||
|
||||
def bestrelpath(self, dest):
|
||||
"""Return a string which is a relative path from self
|
||||
|
|
|
@ -601,7 +601,7 @@ class TestAssert_reprcompare:
|
|||
|
||||
def test_list_dont_wrap_strings(self) -> None:
|
||||
long_a = "a" * 10
|
||||
l1 = ["a"] + [long_a for _ in range(0, 7)]
|
||||
l1 = ["a"] + [long_a for _ in range(7)]
|
||||
l2 = ["should not get wrapped"]
|
||||
diff = callequal(l1, l2, verbose=True)
|
||||
assert diff == [
|
||||
|
|
|
@ -1231,8 +1231,7 @@ def test_plugin_loading_order(pytester: Pytester) -> None:
|
|||
import myplugin
|
||||
assert myplugin.terminal_plugin == [False, True]
|
||||
""",
|
||||
**{
|
||||
"myplugin": """
|
||||
myplugin="""
|
||||
terminal_plugin = []
|
||||
|
||||
def pytest_configure(config):
|
||||
|
@ -1241,8 +1240,7 @@ def test_plugin_loading_order(pytester: Pytester) -> None:
|
|||
def pytest_sessionstart(session):
|
||||
config = session.config
|
||||
terminal_plugin.append(bool(config.pluginmanager.get_plugin("terminalreporter")))
|
||||
"""
|
||||
},
|
||||
""",
|
||||
)
|
||||
pytester.syspathinsert()
|
||||
result = pytester.runpytest("-p", "myplugin", str(p1))
|
||||
|
|
|
@ -74,7 +74,7 @@ class TestEvaluation:
|
|||
"""@pytest.mark.skipif("not hasattr(os, 'murks')")""",
|
||||
"""@pytest.mark.skipif(condition="hasattr(os, 'murks')")""",
|
||||
]
|
||||
for i in range(0, 2):
|
||||
for i in range(2):
|
||||
item = pytester.getitem(
|
||||
f"""
|
||||
import pytest
|
||||
|
|
Loading…
Reference in New Issue