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