Refine Python CI

Add lint environment to `deltachat-rpc-client/`
and set line length to 120, same as in `python/`.

Switch from flake8 to ruff.

Fix ruff warnings.
This commit is contained in:
link2xt
2023-01-19 00:31:39 +00:00
parent ef6f252842
commit fac7b064b4
41 changed files with 312 additions and 345 deletions

View File

@@ -13,8 +13,8 @@ def datadir():
datadir = path.join("test-data")
if datadir.isdir():
return datadir
else:
pytest.skip("test-data directory not found")
pytest.skip("test-data directory not found")
return None
def test_echo_quit_plugin(acfactory, lp):
@@ -47,7 +47,7 @@ def test_group_tracking_plugin(acfactory, lp):
botproc.fnmatch_lines(
"""
*ac_configure_completed*
"""
""",
)
ac1.add_account_plugin(FFIEventLogger(ac1))
ac2.add_account_plugin(FFIEventLogger(ac2))
@@ -61,7 +61,7 @@ def test_group_tracking_plugin(acfactory, lp):
botproc.fnmatch_lines(
"""
*ac_chat_modified*bot test group*
"""
""",
)
lp.sec("adding third member {}".format(ac2.get_config("addr")))
@@ -76,8 +76,9 @@ def test_group_tracking_plugin(acfactory, lp):
"""
*ac_member_added {}*from*{}*
""".format(
contact3.addr, ac1.get_config("addr")
)
contact3.addr,
ac1.get_config("addr"),
),
)
lp.sec("contact successfully added, now removing")
@@ -86,6 +87,7 @@ def test_group_tracking_plugin(acfactory, lp):
"""
*ac_member_removed {}*from*{}*
""".format(
contact3.addr, ac1.get_config("addr")
)
contact3.addr,
ac1.get_config("addr"),
),
)