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

MyPy CI failures #1383

Closed
L1ghtn1ng opened this issue Apr 10, 2023 · 4 comments
Closed

MyPy CI failures #1383

L1ghtn1ng opened this issue Apr 10, 2023 · 4 comments

Comments

@L1ghtn1ng
Copy link
Collaborator

Feature Request or Bug or Other
Bug

Describe the feature request or bug or other
A clear and concise description of what the bug, feature request,
or other request is.

To Reproduce
Steps to reproduce the behavior:

  1. In the root dir of theHarvester run
    mypy --pretty theHarvester//.py
    mypy --pretty theHarvester///*.py

  2. See errors

Expected behavior
No errors

@yoonthegoon
Copy link
Contributor

Commands are mypy --pretty theHarvester/*/*.py and mypy --pretty theHarvester/*/**.py for clarity since they were formatted.

I'm gonna take a stab at this.

@yoonthegoon
Copy link
Contributor

yoonthegoon commented Jul 23, 2023

I formatted the relevant files with black and isort while working on this.
The line numbers here correspond to that formatting.
This is here just so I can keep track.

  • File: theHarvester/lib/stash.py

    • Line: 197 - Error: Incompatible types in assignment (expression has type "Iterable[Row]", variable has type "list[Any]") [assignment]
    • Line: 218 - Error: Value of type "Optional[Row]" is not indexable [index]
    • Line: 223 - Error: Incompatible types in assignment (expression has type "Iterable[Row]", variable has type "list[Any]") [assignment]
    • Line: 328 - Error: Incompatible types in assignment (expression has type "Iterable[Row]", variable has type "list[Any]") [assignment]
  • File: theHarvester/screenshot/screenshot.py

    • Line: 56 - Error: Value of type "Sized" is not indexable [index]
  • File: theHarvester/lib/core.py

    • Line: 112 - Error: Incompatible return value type (got "tuple[Any, Any]", expected "str") [return-value]
    • Line: 290 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 303 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 316 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 325 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 445 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 465 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 488 - Error: Argument "headers" to "ClientSession" has incompatible type "Sized"; expected "Union[Mapping[Union[str, istr], str], CIMultiDict[str], CIMultiDictProxy[str], None]" [arg-type]
    • Line: 496 - Error: Argument 3 to "fetch" of "AsyncFetcher" has incompatible type "Sized"; expected "str" [arg-type]
  • File: theHarvester/discovery/takeover.py

    • Line: 15 - Error: Need type annotation for "fingerprints" (hint: "fingerprints: Dict[, ] = ...") [var-annotated]
    • Line: 17 - Error: Need type annotation for "results" [var-annotated]
    • Line: 99 - Error: Incompatible types in assignment (expression has type "list[Any]", variable has type "tuple[Any, ...]") [assignment]
  • File: theHarvester/discovery/dnsdumpster.py

    • Line: 28 - Error: Incompatible types in assignment (expression has type "list[str]", variable has type "str") [assignment]
    • Line: 33 - Error: Incompatible types in assignment (expression has type "list[str]", variable has type "str") [assignment]
  • File: theHarvester/discovery/constants.py

    • Line: 92 - Error: Argument "data" to "post_fetch" of "AsyncFetcher" has incompatible type "dict[str, str]"; expected "str" [arg-type]
  • File: theHarvester/discovery/zoomeyesearch.py

    • Line: 58 - Error: Incompatible types in assignment (expression has type "Pattern[str]", variable has type "str") [assignment]
  • File: theHarvester/discovery/securitytrailssearch.py

    • Line: 57 - Error: Incompatible types in assignment (expression has type "Union[list[Any], tuple[Any, ...]]", variable has type "tuple[]") [assignment]
    • Line: 62 - Error: Tuple index out of range [misc]
    • Line: 65 - Error: Tuple index out of range [misc]
  • File: theHarvester/discovery/intelxsearch.py

    • Line: 63 - Error: Incompatible types in assignment (expression has type "tuple[Any, ...]", variable has type "None") [assignment]
    • Line: 71 - Error: Incompatible types in assignment (expression has type "tuple[Any, ...]", variable has type "tuple[]") [assignment]
    • Line: 71 - Error: Argument 1 to "parse_dictionaries" of "Parser" has incompatible type "None"; expected "dict[Any, Any]" [arg-type]
  • File: theHarvester/discovery/githubcode.py

    • Line: 111 - Error: Incompatible return value type (got "Optional[Any]", expected "int") [return-value]
  • File: theHarvester/discovery/bingsearch.py

    • Line: 51 - Error: Incompatible types in assignment (expression has type "tuple[Any, ...]", variable has type "str") [assignment]
  • File: theHarvester/discovery/censysearch.py

    • Line: 8 - Error: Module "censys.search" has no attribute "CensysCertificates"; maybe "CensysCerts"? [attr-defined]

yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 23, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
yoonthegoon added a commit to yoonthegoon/theHarvester that referenced this issue Jul 24, 2023
@yoonthegoon
Copy link
Contributor

Resolved by 4f0e3bc.

@L1ghtn1ng
Copy link
Collaborator Author

L1ghtn1ng commented Jul 25, 2023

Again, major thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants