Skip to content
Unverified Commit 7aefbd69 authored by Randy Döring's avatar Randy Döring Committed by GitHub
Browse files

Use flake8 simplify (#4798)

* Fix SIM102: Use a single if-statement instead of nested if-statements

* Fix SIM105: Use 'contextlib.suppress(...)' instead of try-except-pass

* Fix SIM110: Use 'return any(...)'

* Fix SIM113: Use enumerate instead of manually incrementing a counter

* Fix SIM114: Combine conditions via a logical or to prevent duplicating code

* Fix SIM211: Use 'not a' instead of 'False if a else True'

* Fix SIM300: Use 'age == 42' instead of '42 == age' (Yoda-conditions)

* Fix SIM119: Use dataclasses for data containers

* Ignore "SIM106: Handle error-cases first" for now
parent 5c328a36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment