forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sqlfluff:main' into main
Showing
99 changed files
with
4,071 additions
and
1,887 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""Defines the formatter interface which can be used by the CLI. | ||
The linter module provides an optional formatter input which effectively | ||
allows callbacks at various points of the linting process. This is primarily | ||
to allow printed output at various points by the CLI, but could also be used | ||
for logging our other processes looking to report back as the linting process | ||
continues. | ||
In this module we only define the interface. Any modules wishing to use the | ||
interface should override with their own implementation. | ||
""" | ||
|
||
from abc import ABC, abstractmethod | ||
|
||
|
||
class FormatterInterface(ABC): | ||
"""Generic formatter interface.""" | ||
|
||
@abstractmethod | ||
def dispatch_persist_filename(self, filename: str, result: str) -> None: | ||
"""Called after a formatted file as been persisted to disk.""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.