fix(seautils): pylint fix
All checks were successful
Actions / Build Documentation (MkDocs) (push) Successful in 26s
Actions / Lint Code (Ruff & Pylint) (push) Successful in 37s

This commit is contained in:
Seaswimmer 2024-05-30 11:02:22 -04:00
parent 545106d496
commit 46f189a297
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
2 changed files with 4 additions and 3 deletions

View file

@ -18,4 +18,5 @@
import-self, import-self,
relative-beyond-top-level, relative-beyond-top-level,
too-many-instance-attributes, too-many-instance-attributes,
duplicate-code duplicate-code,
too-many-nested-blocks

View file

@ -101,14 +101,14 @@ class SeaUtils(commands.Cog):
@commands.command(name='dig', aliases=['dnslookup', 'nslookup']) @commands.command(name='dig', aliases=['dnslookup', 'nslookup'])
@commands.is_owner() @commands.is_owner()
async def dig(self, ctx: commands.Context, name: str, type: str | None = None, server: str | None = None, port: int = 53) -> None: async def dig(self, ctx: commands.Context, name: str, record_type: str | None = None, server: str | None = None, port: int = 53) -> None:
"""Retrieve DNS information for a domain. """Retrieve DNS information for a domain.
Uses `dig` to perform a DNS query. Will fall back to `nslookup` if `dig` is not installed on the system. Uses `dig` to perform a DNS query. Will fall back to `nslookup` if `dig` is not installed on the system.
`nslookup` does not provide as much information as `dig`, so only the `name` parameter will be used if `nslookup` is used. `nslookup` does not provide as much information as `dig`, so only the `name` parameter will be used if `nslookup` is used.
Will return the A, AAAA, and CNAME records for a domain by default. You can specify a different record type with the `type` parameter.""" Will return the A, AAAA, and CNAME records for a domain by default. You can specify a different record type with the `type` parameter."""
command_opts: list[str | int] = ['dig'] command_opts: list[str | int] = ['dig']
query_types = [type] if type else ['A', 'AAAA', 'CNAME'] query_types: list[str] = [record_type] if record_type else ['A', 'AAAA', 'CNAME']
if server: if server:
command_opts.extend(['@', server]) command_opts.extend(['@', server])
for query_type in query_types: for query_type in query_types: