-
Hi! python: 3.8.10 .pre-commit-config.yaml
pyproject.toml
test.py
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @deadkex, thanks for the detailed problem report! I started by trying to reproduce this without pre-commit, but at least Darker works correctly here: mkdir /tmp/drktst
cd /tmp/drktst
git init
cat <<EOF >test.py
try:
x = 1
except Exception:
print("exception")
EOF
git add test.py
git commit -m "Initial commit"
cat <<EOF >test.py
try:
pass
except:
pass
EOF
darker -L flake8 . /tmp/drktst/test.py:3:1: E722 do not use bare 'except'
/tmp/drktst/test.py:3:1: B001 Do not use bare `except:`, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer `except Exception:`. If you're sure what you're doing, be explicit and write `except BaseException:`. So probably this is a problem in either how Darker behaves when run by Does this help you forward in diagnosing the issue? |
Beta Was this translation helpful? Give feedback.
-
Hey, i encountered another thing.
|
Beta Was this translation helpful? Give feedback.
-
I created GitHub issues #374 and #375 for the problems reported here. Closing the discussion, to be continued in the issues. Thanks @deadkex! |
Beta Was this translation helpful? Give feedback.
I created GitHub issues #374 and #375 for the problems reported here. Closing the discussion, to be continued in the issues. Thanks @deadkex!