mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
lint: Kill bare excepts
This commit is contained in:
parent
941cc29438
commit
61ec02c97c
3 changed files with 3 additions and 3 deletions
|
@ -407,7 +407,7 @@ def is_unit_operation(
|
||||||
if isinstance(value, IOBase):
|
if isinstance(value, IOBase):
|
||||||
try:
|
try:
|
||||||
context[field] = value.name
|
context[field] = value.name
|
||||||
except:
|
except Exception:
|
||||||
context[field] = "IOBase"
|
context[field] = "IOBase"
|
||||||
operation_logger = OperationLogger(op_key, related_to, args=context)
|
operation_logger = OperationLogger(op_key, related_to, args=context)
|
||||||
|
|
||||||
|
|
|
@ -474,7 +474,7 @@ def permission_create(
|
||||||
protected=protected,
|
protected=protected,
|
||||||
sync_perm=sync_perm,
|
sync_perm=sync_perm,
|
||||||
)
|
)
|
||||||
except:
|
except Exception:
|
||||||
permission_delete(permission, force=True)
|
permission_delete(permission, force=True)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -9,7 +9,7 @@ deps =
|
||||||
py37-mypy: mypy >= 0.900
|
py37-mypy: mypy >= 0.900
|
||||||
commands =
|
commands =
|
||||||
py37-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor
|
py37-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor
|
||||||
py37-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F
|
py37-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F,E722
|
||||||
py37-black-check: black --check --diff src doc data tests
|
py37-black-check: black --check --diff src doc data tests
|
||||||
py37-black-run: black src doc data tests
|
py37-black-run: black src doc data tests
|
||||||
py37-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/yunohost/ --exclude (acme_tiny|data_migrations)
|
py37-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/yunohost/ --exclude (acme_tiny|data_migrations)
|
||||||
|
|
Loading…
Add table
Reference in a new issue