Skip to content

STYLE,BUG: autotyping hook fails if run on no files #48808

Closed
@MarcoGorelli

Description

@MarcoGorelli

Not sure why yet, but here's what I got after a commit:

(pandas-dev) marcogorelli@DESKTOP-U8OKFP3:~/pandas-dev/doc$ git commit -a -m 'doc'
absolufy-imports........................................................................................Passed
vulture.................................................................................................Passed
black...................................................................................................Passed
codespell...............................................................................................Passed
cython-lint.........................................................................(no files to check)Skipped
debug statements (python)...............................................................................Passed
fix end of files........................................................................................Passed
trim trailing whitespace................................................................................Passed
cpplint.............................................................................(no files to check)Skipped
flake8..................................................................................................Passed
isort...................................................................................................Passed
pyupgrade...............................................................................................Passed
rst ``code`` is two backticks.......................................................(no files to check)Skipped
rst directives end with two colons......................................................................Passed
rst ``inline code`` next to normal text.................................................................Passed
Sphinx lint.........................................................................(no files to check)Skipped
Strip unnecessary `# noqa`s.............................................................................Passed
flake8-rst..........................................................................(no files to check)Skipped
Unwanted patterns.......................................................................................Passed
Check Cython casting is `<type>obj`, not `<type> obj`...............................(no files to check)Skipped
Check for backticks incorrectly rendering because of missing spaces.................(no files to check)Skipped
Check for unnecessary random seeds in asv benchmarks................................(no files to check)Skipped
Check for usage of numpy testing or array_equal.....................................(no files to check)Skipped
Check for invalid EA testing........................................................(no files to check)Skipped
Generate pip dependency from conda..................................................(no files to check)Skipped
Check flake8 version is synced across flake8, yesqa, and environment.yml............(no files to check)Skipped
Validate correct capitalization among titles in documentation.......................(no files to check)Skipped
Import pandas.array as pd_array in core.................................................................Passed
Use pandas.io.common.urlopen instead of urllib.request.urlopen..........................................Passed
Use bool_t instead of bool in pandas/core/generic.py................................(no files to check)Skipped
Ensure pandas errors are documented in doc/source/reference/testing.rst.............(no files to check)Skipped
Check for pg8000 not installed on CI for test_pg8000_sqlalchemy_passthrough_error...(no files to check)Skipped
Check minimum version of dependencies are aligned...................................(no files to check)Skipped
Validate errors locations...............................................................................Passed
flake8-pyi..........................................................................(no files to check)Skipped
import annotations from __future__......................................................................Passed
autotyping..............................................................................................Failed
- hook id: autotyping
- exit code: 2


usage: libcst.tool codemod
       [-h]
       [-j JOBS]
       [-p VERSION]
       [-u [CONTEXT]]
       [--include-generated]
       [--include-stubs]
       [--no-format]
       [--show-successes]
       [--hide-generated-warnings]
       [--hide-blacklisted-warnings]
       [--hide-progress]
       [--annotate-optional [ANNOTATE_OPTIONAL [ANNOTATE_OPTIONAL ...]]]
       [--annotate-named-param [ANNOTATE_NAMED_PARAM [ANNOTATE_NAMED_PARAM ...]]]
       [--none-return]
       [--scalar-return]
       [--bool-param]
       [--int-param]
       [--float-param]
       [--str-param]
       [--bytes-param]
       [--annotate-magics]
       [--annotate-imprecise-magics]
       [--pyanalyze-report PYANALYZE_REPORT]
       [--only-without-imports]
       [--safe [SAFE]]
       [--aggressive [AGGRESSIVE]]
       COMMAND
       PATH
       [PATH ...]
libcst.tool codemod: error: the following arguments are required: PATH

This hook was added in #48191
cc @twoertwein in case you've come across this before (I'll have a look later anyway, just opening an issue for now)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code StyleCode style, linting, code_checks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions