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 Rencently I update the sourcery via pycharm, but it always raise an exception. ![image](https://user-images.githubusercontent.com/57038375/183544683-57052fe7-d999-45f7-9ff5-d3724ddf28a8.png) At first, I thought it was a proxy problem. But when...

bug

### Semantics-breaking refactoring suggested by Sourcery "Merge dictionary updates via the union operator" Code before: ``` a = {'a': 'b'} a.update({k: a[v] for k, v in {'c': 'a'}.items()}) ``` When...

### Issue description or question Could you provide JSON schema files for your project and user settings? This would make changing (and exploring) the settings options available right from an...

enhancement

### Issue description or question I'm using sourcery on CentOS 7 with VS Code, using Remote - SSH, and when the first python file is opened sourcery tries to start...

bug

### Issue description or question def __repr__(self): return "" % (self.__class__.__name__, self) is listed as def __repr__(self): - return "%s: %s>" % (self.__class__.__name__, self) + return f"{self.__class__.__name__}: {self}>" Note the...

bug

### Issue description or question I am unable to install sourcery-cli via pip. When I run `pip install sourcery-cli`, I am shown the following error: ``` $ pip install sourcery-cli...

question

### Issue description or question **Issue reported to our e-mail support.** The `match` statement, introduced in Python 3.10, causes Sourcery to throw the following error: ``` [Error - 6:28:41 PM]...

bug

### Issue description or question I use Sourcery via the VS Code extension, and while VS Code is now native M1, I noticed that Sourcery still appears in Activity Monitor...

enhancement

The applicable code snippet is as follows: ```python if cond: assert False, "msg" # ==> assert not cond, "msg" ``` I have encountered this in one of my codebases and...

enhancement

### Sourcery fails to recognize [python docstrings](https://peps.python.org/pep-0257/), and the refactoring it offers delete the entire class/function the "problem" it reports is Sourcery - Remove unnecessary call to `str()` within `print()`...

question