ruff/crates/ruff
Tom Kuson a0a93a636f
Implement Pylint `single-string-used-for-slots` (`C0205`) as `single-string-slots` (`PLC0205`) (#5399)
## Summary

Implement Pylint rule `single-string-used-for-slots` (`C0205`) as
`single-string-slots` (`PLC0205`). This rule checks for single strings
being assigned to `__slots__`. For example

```python
class Foo:
    __slots__: str = "bar"

    def __init__(self, bar: str) -> None:
        self.bar = bar
```

should be

```python
class Foo:
    __slots__: tuple[str, ...] = ("bar",)

    def __init__(self, bar: str) -> None:
        self.bar = bar
```

Related to #970. Includes documentation.

## Test Plan

`cargo test`
2023-06-27 18:33:58 +00:00
..
resources/test Implement Pylint `single-string-used-for-slots` (`C0205`) as `single-string-slots` (`PLC0205`) (#5399) 2023-06-27 18:33:58 +00:00
src Implement Pylint `single-string-used-for-slots` (`C0205`) as `single-string-slots` (`PLC0205`) (#5399) 2023-06-27 18:33:58 +00:00
Cargo.toml Experimental release for Jupyter notebook integration (#5363) 2023-06-26 21:22:42 +05:30