sourcery icon indicating copy to clipboard operation
sourcery copied to clipboard

Instant AI code reviews

Results 146 sourcery issues
Sort by recently updated
recently updated
newest added

### Issue description or question Refactor `if all([obj]):` into `if obj:` As it says on the tin, really! Same goes for similar usages of `any`, I suppose!

enhancement

### Issue description or question I have to work on a project that is still Python 2 for work, but all the other projects I work on are Python 3.8...

enhancement

### Issue description or question I note that [in your docs](https://docs.sourcery.ai/Configuration/#setting-the-python-version-assumed-by-sourcery) you support a specification of a Python version for any suggestions being made, but would it be possible to...

enhancement

### Issue description or question ![image](https://user-images.githubusercontent.com/1243957/155853624-7b02d4be-fae5-42d4-ac35-ac089a403eab.png) 1. The `test2` method is actually the properly typed one, yet Sourcery fails to suggest the same simplification. 2. The suggested simplification could be...

enhancement

### Issue description or question Sourcery puts the squiggly blue line underneath the commented code instead of the actual line of code. ![image](https://user-images.githubusercontent.com/44804291/131658332-3fcee221-e649-4035-b367-51364ccf2629.png) ![image](https://user-images.githubusercontent.com/44804291/131658346-a2c48b78-3ff7-4bdb-8fbc-7ee65125bc66.png) ### Sourcery Version Not sure where...

bug
low priority

Hi, I haven't been able to get Sourcery working so far. I am continuously getting the following error. Failed to launch Sourcery service java.util.concurrent.TimeoutException ### Sourcery Version Sourcery 0.9.8 ###...

enhancement

### Issue description or question I have observed that sourcery creates an `auth.yaml` file in the `~/.config/sourcery/` directory, but it has not been documented in the docs. Could you guys...

enhancement

### Issue description or question If you have code like: ``` def find_item(needle, haystack): result = haystack.search(arg1=True, arg2=False, field1=needle) if not result: result = haystack.search(arg1=True, arg2=False, field2=needle) if not result:...

enhancement

### Issue description or question Hi again! It would be awesome if Sourcery were able to simplify `Union`s in type annotations, just like described in the [docs](https://docs.python.org/3/library/typing.html#typing.Union). There would be...

enhancement

### Issue description or question I recently let the GitHub bot write a PR. There are some things the bot missed when it comes to the `len()` statements, I'd like...

enhancement