Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify code to reduce cognitive load #348

Merged
merged 4 commits into from
Feb 17, 2021
Merged

Conversation

brainix
Copy link
Owner

@brainix brainix commented Feb 17, 2021

Prefer:

if value is None:
    raise ValueError
return value

...over:

if value is None:
    raise ValueError
else:
    return value

Prefer:

```python
if value is None:
    raise ValueError
return value
```

...over:

```python
if value is None:
    raise ValueError
else:
    return value
```
Prefer:

```python
if value is None:
    raise ValueError
return value
```

...over:

```python
if value is None:
    raise ValueError
else:
    return value
```
Prefer:

```python
if value is None:
    raise ValueError
return value
```

...over:

```python
if value is None:
    raise ValueError
else:
    return value
```
Prefer:

```python
if value is None:
    raise ValueError
return value
```

...over:

```python
if value is None:
    raise ValueError
else:
    return value
```
@brainix
Copy link
Owner Author

brainix commented Feb 17, 2021

🐟

@brainix brainix merged commit 863c641 into master Feb 17, 2021
@brainix brainix deleted the reduced-cognitive-load branch February 17, 2021 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant