Skip to content

Commit 4cffb9d

Browse files
committed
dog-food format
1 parent 79b214e commit 4cffb9d

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

ni_python_styleguide/_acknowledge_existing_errors/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import logging
22
import pathlib
33
import re
4-
from collections import defaultdict
54
import typing
5+
from collections import defaultdict
66

77
from ni_python_styleguide import _format, _utils
88

@@ -42,7 +42,12 @@ def _filter_suppresion_from_line(line: str):
4242

4343

4444
def acknowledge_lint_errors(
45-
exclude, app_import_names, extend_ignore: typing.Optional[str], file_or_dir, *_, aggressive=False
45+
exclude,
46+
app_import_names,
47+
extend_ignore: typing.Optional[str],
48+
file_or_dir,
49+
*_,
50+
aggressive=False,
4651
):
4752
"""Adds a "noqa" comment for each of existing errors (unless excluded).
4853

ni_python_styleguide/_fix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import logging
22
import pathlib
3-
from collections import defaultdict
4-
from typing import Iterable, Tuple
53
import typing
4+
from collections import defaultdict
5+
from typing import Iterable
66

77
import better_diff.unified_plus
88
import isort

ni_python_styleguide/_lint.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
from ni_python_styleguide import _config_constants, _Flake8Error
1010

1111

12-
def lint(qs_or_vs, exclude, app_import_names, format, extend_ignore: typing.Optional[str], file_or_dir):
12+
def lint(
13+
qs_or_vs, exclude, app_import_names, format, extend_ignore: typing.Optional[str], file_or_dir
14+
):
1315
"""Run the linter."""
1416
app = flake8.main.application.Application()
1517
args = [
@@ -32,7 +34,9 @@ def lint(qs_or_vs, exclude, app_import_names, format, extend_ignore: typing.Opti
3234

3335
# Note: tried to use functools.wraps
3436
# - but VSCode did not properly identify the wrapped method's signature :(
35-
def get_lint_output(qs_or_vs, exclude, app_import_names, format, extend_ignore: typing.Optional[str], file_or_dir) -> str:
37+
def get_lint_output(
38+
qs_or_vs, exclude, app_import_names, format, extend_ignore: typing.Optional[str], file_or_dir
39+
) -> str:
3640
"Return the output from running the linter."
3741
capture = io.TextIOWrapper(io.BytesIO())
3842
with contextlib.redirect_stdout(capture):

ni_python_styleguide/_utils/lint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
from ni_python_styleguide import _lint
66

77

8-
def get_errors_to_process(exclude, app_import_names, extend_ignore: typing.Optional[str], file_or_dir, excluded_errors):
8+
def get_errors_to_process(
9+
exclude, app_import_names, extend_ignore: typing.Optional[str], file_or_dir, excluded_errors
10+
):
911
"""Get lint errors to process."""
1012
lint_errors = sorted(
1113
_lint.get_lint_output(

0 commit comments

Comments
 (0)