{"id":23007,"library":"yesqa","title":"yesqa","description":"yesqa automatically removes unnecessary `# noqa` comments from Python code. It works by running flake8 (or other supported linters) to determine which noqa directives are actually needed. Current version is 1.5.0, released as a command-line tool with no Python API. Maintenance is active.","status":"active","version":"1.5.0","language":"python","source_language":"en","source_url":"https://github.com/asottile/yesqa","tags":["linter","noqa","flake8","code-quality","automation"],"install":[{"cmd":"pip install yesqa","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"yesqa uses flake8 under the hood to detect unnecessary noqa comments.","package":"flake8","optional":false}],"imports":[{"note":"yesqa is primarily used as a CLI tool. The Python module exists but exposes only the internal main function. Use command line instead.","wrong":"","symbol":"main","correct":"import yesqa"}],"quickstart":{"code":"# Run yesqa on a single file\nyesqa myfile.py\n\n# Run yesqa on all Python files in a directory (using find)\nfind . -name '*.py' -exec yesqa {} +\n\n# Run with flake8 options (passed through to flake8)\nyesqa --ignore E501 myfile.py","lang":"python","description":"Basic usage: run 'yesqa <file>' to remove unnecessary noqa comments. The tool reads flake8 configuration from setup.cfg, tox.ini, or .flake8 automatically."},"warnings":[{"fix":"Ensure flake8 is installed: pip install flake8","message":"yesqa does not work without flake8 or a compatible linter installed. It relies on flake8's AST to determine which noqa comments are needed. Without flake8, yesqa will raise an ImportError.","severity":"gotcha","affected_versions":"all"},{"fix":"Use version control to review changes: 'git diff' before committing.","message":"Running yesqa on a file that already has noqa comments on every line may remove all of them if they are all unnecessary, potentially exposing previously ignored lint errors. Always review the diff.","severity":"gotcha","affected_versions":"all"},{"fix":"Update to latest version: pip install --upgrade yesqa","message":"yesqa versions prior to 1.0.0 used a different CLI interface. If you have an old script using 'python -m yesqa' without arguments, it may not work as expected.","severity":"deprecated","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install flake8' to install flake8.","cause":"yesqa requires flake8 to be installed in the same Python environment.","error":"ModuleNotFoundError: No module named 'flake8'"},{"fix":"Specify a file or use wildcard: 'yesqa *.py'","cause":"yesqa requires at least one filename as argument. Running without arguments is not supported.","error":"yesqa: error: argument filename: expected one argument"},{"fix":"Create a flake8 configuration file (e.g., .flake8) in your project root.","cause":"yesqa looks for flake8 configuration files. If missing, it may not detect custom error codes.","error":"Cannot find configuration for flake8 in setup.cfg or .flake8"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}