Skip to content

Commit 0683783

Browse files
authored
chore: Code simplification via flake8-simplify (#138)
1 parent b48d049 commit 0683783

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dev = [
4242
"flake8-noqa ~= 1.3.1",
4343
"flake8-pytest-style ~= 1.7.2",
4444
"flake8-quotes ~= 3.3.2",
45+
"flake8-simplify ~= 0.20.0",
4546
"flake8-unused-arguments ~= 0.0.13",
4647
"isort ~= 5.12.0",
4748
"mypy ~= 1.3.0",

src/apify_client/_logging.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
class _WithLogDetailsClient(type):
2929
def __new__(cls: Type[type], name: str, bases: Tuple, attrs: Dict) -> '_WithLogDetailsClient':
3030
for attr_name, attr_value in attrs.items():
31-
if not attr_name.startswith('_'):
32-
if inspect.isfunction(attr_value):
33-
attrs[attr_name] = _injects_client_details_to_log_context(attr_value)
31+
if not attr_name.startswith('_') and inspect.isfunction(attr_value):
32+
attrs[attr_name] = _injects_client_details_to_log_context(attr_value)
3433

3534
return cast(_WithLogDetailsClient, type.__new__(cls, name, bases, attrs))
3635

0 commit comments

Comments
 (0)