Skip to content

Commit c586593

Browse files
committed
Lint
1 parent 032f026 commit c586593

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

flake8_github_actions/__init__.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
# OR OTHER DEALINGS IN THE SOFTWARE.
2727
#
2828

29+
# stdlib
30+
from typing import Any
31+
2932
# 3rd party
3033
from flake8.formatting.base import BaseFormatter # type: ignore
3134

@@ -35,39 +38,41 @@
3538
__version__: str = "0.1.1"
3639
__email__: str = "dominic@davis-foster.co.uk"
3740

38-
__all__ = ["GitHubFormatter"]
41+
__all__ = ("GitHubFormatter", )
3942

4043

4144
class GitHubFormatter(BaseFormatter):
4245
"""
4346
Custom Flake8 formatter for GitHub actions.
4447
"""
4548

46-
def write_line(self, line):
49+
reported_errors_count: int
50+
51+
def write_line(self, line: str) -> None:
4752
"""
4853
Override write for convenience.
4954
"""
5055
self.write(line, None)
5156

52-
def start(self): # noqa: D102
57+
def start(self) -> None: # noqa: D102
5358
super().start()
5459
self.files_reported_count = 0
5560

56-
def beginning(self, filename):
61+
def beginning(self, filename: Any) -> None:
5762
"""
5863
We're starting a new file.
5964
"""
6065

6166
self.reported_errors_count = 0
6267

63-
def finished(self, filename):
68+
def finished(self, filename: Any) -> None:
6469
"""
6570
We've finished processing a file.
6671
"""
6772

6873
self.files_reported_count += 1
6974

70-
def format(self, violation): # noqa: A003 # pylint: disable=redefined-builtin
75+
def format(self, violation) -> None: # noqa: A003 # pylint: disable=redefined-builtin
7176
"""
7277
Format a violation.
7378
"""

0 commit comments

Comments
 (0)