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

Feature request: warn when pytype-single would have failed #1572

Open
gmacon opened this issue Jan 25, 2024 · 0 comments
Open

Feature request: warn when pytype-single would have failed #1572

gmacon opened this issue Jan 25, 2024 · 0 comments
Labels
cat: infrastructure supported platforms, dependency detection, etc. enhancement

Comments

@gmacon
Copy link

gmacon commented Jan 25, 2024

I'm using pytype on my codebase, which currently has 90 files checked by pytype. Right now, 37 of them, or 41%, are not being checked due to #1571, but I didn't know that because the main pytype entry point currently silences the failures by passing --nofail to pytype-single. I'm requesting that a warning be provided by default when a file is ignored like this.

$ pytype --conf pytype.toml 
Computing dependencies
Analyzing 90 sources with 0 local dependencies
ninja: Entering directory `.pytype'
(progress bar elided)
Leaving directory '.pytype'
Success: no errors found
$ grep -R -l 'Caught error in pytype' .pytype/pyi | wc -l
37
$ pytype --version
2024.01.05
$ python --version
Python 3.8.18

In case it makes a difference, my pytype.toml

[tool.pytype]
inputs = ["./src"]
jobs = "auto"
python_version = '3.8'
disable = []
exclude = [
   # a few miscellaneous files
]

# Always use function return type annotations. This flag is temporary and will
# be removed once this behavior is enabled by default.
always_use_return_annotations = true

# Use the enum overlay for more precise enum checking. This flag is temporary
# and will be removed once this behavior is enabled by default.
use_enum_overlay = true
@rchen152 rchen152 added enhancement cat: infrastructure supported platforms, dependency detection, etc. labels Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: infrastructure supported platforms, dependency detection, etc. enhancement
Projects
None yet
Development

No branches or pull requests

2 participants