Skip to content
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

ignore PGH003 globally #484

Merged
merged 2 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alluka/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_type_dependency(self, type_: type[_T], /, *, default: _DefaultT) -> _T |
def get_type_dependency(self, type_: type[_T], /, *, default: _DefaultT | _NoValue = _NO_VALUE) -> _T | _DefaultT:
# <<inherited docstring from alluka.abc.Context>>.
if type_ is alluka.Context:
return self # type: ignore # noqa: PGH003
return self # type: ignore

result = self._client.get_type_dependency(type_, default=default)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ ignore = [
"COM812", # Trailing comma missing (incompatible with black)
"FIX002", # Line contains TODO, consider resolving the issue
"I001", # [*] Import block is un-sorted or un-formatted
"PGH003", # Use specific rule codes when ignoring type issues
"S101", # Use of `assert` detected
"SIM108", # Use ternary operator `` instead of `if`-`else`-block
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO @<author_name>: ...`
Expand Down Expand Up @@ -224,7 +225,6 @@ ignore = [
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"FBT001", # Boolean-typed positional argument in function definition
"PGH003", # Use specific rule codes when ignoring type issues
"PLR2004", # Magic value used in comparison, consider replacing `` with a constant variable
"SLF001", # Private member accessed: ``
]
Expand Down
Loading