Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nrbnlulu/reproduce-return-none-ruff
https://github.com/nrbnlulu/reproduce-return-none-ruff
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nrbnlulu/reproduce-return-none-ruff
- Owner: nrbnlulu
- Created: 2023-02-22T18:43:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T18:52:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T09:41:24.042Z (3 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# reproduce-return-none-ruff
run `pre-commit run -a`
and
```python
def return_implicit_none() -> Optional[int]:
if random.randint(1, 2) == 2:
return 2
```
would become
```python
def return_implicit_none() -> Optional[int]:
if random.randint(1, 2) == 2:
return 2
return None
```