Skip to content

Conversation

@tristanlatr
Copy link
Contributor

Fixes #855

@tristanlatr
Copy link
Contributor Author

Looks like black messes with the # type: ignore comments :/

pydoctor/astutils.py:794: error: Unpacking a string is disallowed  [misc]
pydoctor/astutils.py:795: error: Cannot determine type of "x"  [has-type]
pydoctor/astutils.py:795: error: Cannot determine type of "z"  [has-type]
pydoctor/astutils.py:795: error: "Never" has no attribute "__iter__" (not iterable)  [attr-defined]
pydoctor/astutils.py:796: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/astutils.py:797: error: Unpacking a string is disallowed  [misc]
pydoctor/astutils.py:798: error: Cannot determine type of "x"  [has-type]
pydoctor/astutils.py:798: error: Cannot determine type of "y"  [has-type]
pydoctor/astutils.py:798: error: "Never" has no attribute "__iter__" (not iterable)  [attr-defined]
pydoctor/astutils.py:799: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/utils.py:47: error: Argument 3 to "findClassFromDottedName" has incompatible type "type[object]"; expected "str | type[T]"  [arg-type]
pydoctor/utils.py:48: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:988: error: Module has no attribute "CATEGORY"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:989: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:997: error: Module has no attribute "CATEGORY_DIGIT"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:998: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:999: error: Module has no attribute "CATEGORY_NOT_DIGIT"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1000: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1001: error: Module has no attribute "CATEGORY_SPACE"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1002: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1003: error: Module has no attribute "CATEGORY_NOT_SPACE"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1004: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1005: error: Module has no attribute "CATEGORY_WORD"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1006: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1007: error: Module has no attribute "CATEGORY_NOT_WORD"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1008: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1014: error: Module has no attribute "AT_BEGINNING_STRING"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1015: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1016: error: Module has no attribute "AT_BEGINNING"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1017: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1018: error: Module has no attribute "AT_END"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1019: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1020: error: Module has no attribute "AT_BOUNDARY"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1021: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1022: error: Module has no attribute "AT_NON_BOUNDARY"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1023: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1024: error: Module has no attribute "AT_END_STRING"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:10[25](https://github.com/twisted/pydoctor/actions/runs/12300218865/job/34327853062?pr=859#step:6:26): error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/epydoc/markup/_pyval_repr.py:1031: error: Module has no attribute "MAX_REPEAT"; maybe "MAXREPEAT" or "_MAXREPEAT"?  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1032: error: Module has no attribute "MIN_REPEAT"  [attr-defined]
pydoctor/epydoc/markup/_pyval_repr.py:1033: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_napoleon_docstring.py:63: error: Variable "pydoctor.test.test_napoleon_docstring.SphinxGoogleDocstring" is not valid as a type  [valid-type]
pydoctor/test/test_napoleon_docstring.py:63: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
pydoctor/test/test_napoleon_docstring.py:63: error: Variable "pydoctor.test.test_napoleon_docstring.SphinxNumpyDocstring" is not valid as a type  [valid-type]
pydoctor/test/test_napoleon_docstring.py:64: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_napoleon_docstring.py:89: error: Cannot instantiate type "Type[SphinxGoogleDocstring?]"  [misc]
pydoctor/test/test_napoleon_docstring.py:89: error: Cannot instantiate type "Type[SphinxNumpyDocstring?]"  [misc]
pydoctor/test/test_napoleon_docstring.py:90: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astutils.py:18: error: Argument 1 to "get_str_value" has incompatible type "Str | None"; expected "expr"  [arg-type]
pydoctor/test/test_astutils.py:18: error: Argument 1 to "get_assign_docstring_node" has incompatible type "stmt"; expected "Assign | AnnAssign"  [arg-type]
pydoctor/test/test_astutils.py:20: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astutils.py:25: error: Argument 1 to "get_str_value" has incompatible type "Str | None"; expected "expr"  [arg-type]
pydoctor/test/test_astutils.py:25: error: Argument 1 to "get_assign_docstring_node" has incompatible type "stmt"; expected "Assign | AnnAssign"  [arg-type]
pydoctor/test/test_astutils.py:[27](https://github.com/twisted/pydoctor/actions/runs/12300218865/job/34327853062?pr=859#step:6:28): error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astutils.py:42: error: Argument 1 to "get_str_value" has incompatible type "Str | None"; expected "expr"  [arg-type]
pydoctor/test/test_astutils.py:42: error: "stmt" has no attribute "orelse"  [attr-defined]
pydoctor/test/test_astutils.py:45: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astutils.py:63: error: Argument 1 to "get_str_value" has incompatible type "Str | None"; expected "expr"  [arg-type]
pydoctor/test/test_astutils.py:63: error: "stmt" has no attribute "handlers"  [attr-defined]
pydoctor/test/test_astutils.py:66: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astutils.py:69: error: Argument 1 to "get_str_value" has incompatible type "Str | None"; expected "expr"  [arg-type]
pydoctor/test/test_astutils.py:69: error: "stmt" has no attribute "orelse"  [attr-defined]
pydoctor/test/test_astutils.py:72: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astutils.py:75: error: Argument 1 to "get_str_value" has incompatible type "Str | None"; expected "expr"  [arg-type]
pydoctor/test/test_astutils.py:75: error: "stmt" has no attribute "finalbody"  [attr-defined]
pydoctor/test/test_astutils.py:78: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/epydoc/test_pyval_repr.py:212: error: "stmt" has no attribute "value"  [attr-defined]
pydoctor/test/epydoc/test_pyval_repr.py:213: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astbuilder.py:3395: error: Argument 1 to "flatten_text" has incompatible type "Tag | None"; expected "bytes | str | slot | CDATA | Comment | <8 more items>"  [arg-type]
pydoctor/test/test_astbuilder.py:3396: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astbuilder.py:3407: error: Argument 1 to "flatten_text" has incompatible type "Tag | None"; expected "bytes | str | slot | CDATA | Comment | <8 more items>"  [arg-type]
pydoctor/test/test_astbuilder.py:3408: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astbuilder.py:3445: error: Argument 1 to "flatten_text" has incompatible type "Tag | None"; expected "bytes | str | slot | CDATA | Comment | <8 more items>"  [arg-type]
pydoctor/test/test_astbuilder.py:3446: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_astbuilder.py:3813: error: Argument 1 to "to_html" has incompatible type "ParsedDocstring | None"; expected "ParsedDocstring"  [arg-type]
pydoctor/test/test_astbuilder.py:3814: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_model.py:501: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable)  [attr-defined]
pydoctor/test/test_model.py:502: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_epydoc2stan.py:1[28](https://github.com/twisted/pydoctor/actions/runs/12300218865/job/34327853062?pr=859#step:6:29)8: error: Item "None" of "ParsedDocstring | None" has no attribute "get_summary"  [union-attr]
pydoctor/test/test_epydoc2stan.py:1[29](https://github.com/twisted/pydoctor/actions/runs/12300218865/job/34327853062?pr=859#step:6:30)0: error: Unused "type: ignore" comment  [unused-ignore]
pydoctor/test/test_templatewriter.py:811: error: Argument 1 to "objects_order" has incompatible type "str"; expected "Literal['alphabetical', 'source']"  [arg-type]
pydoctor/test/test_templatewriter.py:812: error: Unused "type: ignore" comment  [unused-ignore]

@codecov
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

❌ Patch coverage is 91.83267% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.73%. Comparing base (1c6478e) to head (e2cbafb).
⚠️ Report is 48 commits behind head on master.

Files with missing lines Patch % Lines
pydoctor/epydoc/markup/epytext.py 78.21% 12 Missing and 10 partials ⚠️
pydoctor/epydoc/markup/_pyval_repr.py 91.44% 7 Missing and 6 partials ⚠️
pydoctor/epydoc/markup/restructuredtext.py 80.64% 1 Missing and 5 partials ⚠️
pydoctor/model.py 93.33% 4 Missing and 2 partials ⚠️
pydoctor/options.py 91.52% 4 Missing and 1 partial ⚠️
pydoctor/epydoc/markup/__init__.py 85.71% 3 Missing and 1 partial ⚠️
pydoctor/templatewriter/__init__.py 76.47% 4 Missing ⚠️
pydoctor/driver.py 57.14% 3 Missing ⚠️
pydoctor/epydoc2stan.py 94.91% 3 Missing ⚠️
pydoctor/templatewriter/pages/__init__.py 92.50% 3 Missing ⚠️
... and 10 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #859      +/-   ##
==========================================
- Coverage   92.79%   92.73%   -0.07%     
==========================================
  Files          47       47              
  Lines        8468     8504      +36     
  Branches     1550     1557       +7     
==========================================
+ Hits         7858     7886      +28     
- Misses        350      355       +5     
- Partials      260      263       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

According to pydoctor_primer, this change doesn't affect pydoctor warnings on a corpus of open source code. ✅

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

Labels

pending This ticket needs code related to another ticket not yet fixed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup configargparse related code

1 participant