Samson Umezulike

Results 9 issues of Samson Umezulike

### Description This change adds additional checks to the decision whether to split a funcdef from the left or right-hand side. Specifically, this adds the following condition to `should_split_funcdef_with_rhs`: If...

**Describe the bug** A function with type parameters gets formatted incorrectly if the function parameters have a magic trailing comma. **To Reproduce** For example, take this code: ```python def func1[T](a,):...

T: bug

### Description This is intended to fix issues like #3929, #4071, and #4254, where the addition of the new type parameter syntax in Python 3.12 has caused suboptimal formatting of...

### Description This fixes #4264. The issue was that the empty last line does not count as a line to `adjusted_lines` because it is not in the list returned by...

This fixes the bug with the `$each` modifier in `$addToSet`. (Closes #846) Just replacing the list comprehension with a loop seems to be the most straightforward way to solve this...

Using the `$each` modifier with `$addToSet` doesn't always result in unique values because of how the values of the `$each` are handled: https://github.com/mongomock/mongomock/blob/ca41f27161c50d83d5ef8c899623084dd6f09a1d/mongomock/collection.py#LL704C37-L706C80 Example: ```py import mongomock client = mongomock.MongoClient()...

**Describe the bug** Specific placements of standalone comments, primarily in list comprehensions, will cause parsing errors. These are actually formatting errors; black generates invalid code on the first run of...

T: bug
F: comments
C: crash

This closes #760. MyST already escapes the `&` in the query params, but docutils escapes them again when rendering HTML, leading to broken query params. ```md [Link](example.com?foo=1&bar=2) ``` becomes ```html...

Adding typehints would greatly improve usability. Without type annotations, IDE support is very limited and I often have to search through the code to figure out the exact types of...

maintenance