Florian Best

Results 155 issues of Florian Best

`SIM111` simplifies ```diff - for oc in self.objectClasses: - if oc not in objectClasses: - return False - return True + return all(not oc not in objectClasses for oc in...

A fixer for `PLR0402` would be very nice and probably relatively easy: `import foo.bar as bar` → `from foo import bar`

autofix

`RUF100` removes `noqa` comments if the lines doesn't have the underlying issue. This doesn't work if the certain errors aren't part of the `--select`. I wouldn't have expect this: ```sh...

question

UP032 could detect more cases when `.format()` is used and suggest to use a fstring. ``` 'Magic wand: {}'.format(bag['wand']) 'Magic wand: {}'.format(bag["wand"]) 'Magic wand: {}'.format('bag') 'Magic wand: {}'.format(bag) ``` (only...

autofix

`flake8` provides a nice `--statistics` flags which summarizes the findings at the end with a list like the following: ``` 3 E126 continuation line over-indented for hanging indent 1 E225...

good first issue
cli

``` $ ruff --fix --select COM819 --isolated --diff foo.py --- foo.py +++ foo.py @@ -1 +1 @@ -common_udm_options.extend(["--set", "ucsversionend=%s" % (options.ucsversionend,), ]) +common_udm_options.extend(["--set", "ucsversionend=%s" % (options.ucsversionend,) ]) ``` pycodestyle: `foo.py:1:82:...

``` $ ruff --isolated --select SIM108 foo.py foo.py:1:1: SIM108 Use ternary operator `foo = response(1) if item is None else response(item)` instead of if-else-block Found 1 error(s). 1 potentially fixable...

rule

flake8 supports specifying the output format via an command line argument: `flake8 --format '%(path)s'` allowed specifiers are: * code * text * path * row * col ruff could support...

configuration
needs-decision

not detected: `ruff --isolated --select UP034 -

bug

`'_{0}._{1}'.format(*foo)` can't be autofixed. If the order 0 and 1 is correct it should simply be changeable into: `'_{}._{}'.format(*foo)`