-
-
Notifications
You must be signed in to change notification settings - Fork 488
fix typing for get_auto_imports, get_namespace, and run_formatters #2674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -18,4 +19,6 @@ def get_command_line_option(argv: Sequence[Any], option: Any) -> Any | None: ... | |||
def normalize_path_patterns(patterns: Iterable[str]) -> list[str]: ... | |||
def is_ignored_path(path: StrPath, ignore_patterns: Iterable[str]) -> bool: ... | |||
def find_formatters() -> dict[str, str | None]: ... | |||
def run_formatters(written_files: Sequence[StrOrBytesPath], black_path: str = ...) -> None: ... | |||
def run_formatters( | |||
written_files: Sequence[StrOrBytesPath], black_path: str = ..., stderr: object = sys.stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, also make sure that import _typeshed
is there
written_files: Sequence[StrOrBytesPath], black_path: str = ..., stderr: object = sys.stderr | |
written_files: Sequence[StrOrBytesPath], black_path: str = ..., stderr: _typeshed.SupportsWrite[str] = ..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…ypeddjango#2674) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: sobolevn <[email protected]>
Fixed type hints for run_formatter method. Added type hints for get_auto_imports and get_namespace methods
Format is:
django.core.management
for 5.2 #2672django.core.management
for 5.2 #2672