{"id":15361080,"url":"https://github.com/asmeurer/pytest-flakes","last_synced_at":"2025-12-11T21:04:32.352Z","repository":{"id":6766452,"uuid":"8013163","full_name":"asmeurer/pytest-flakes","owner":"asmeurer","description":"pytest plugin for running pyflakes","archived":false,"fork":false,"pushed_at":"2022-03-15T14:03:07.000Z","size":76,"stargazers_count":45,"open_issues_count":1,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-19T12:11:22.982Z","etag":null,"topics":["pyflakes","pytest","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asmeurer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-04T18:19:29.000Z","updated_at":"2024-07-25T23:10:46.000Z","dependencies_parsed_at":"2022-08-31T16:51:58.167Z","dependency_job_id":null,"html_url":"https://github.com/asmeurer/pytest-flakes","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmeurer%2Fpytest-flakes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmeurer%2Fpytest-flakes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmeurer%2Fpytest-flakes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmeurer%2Fpytest-flakes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asmeurer","download_url":"https://codeload.github.com/asmeurer/pytest-flakes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232166715,"owners_count":18482188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pyflakes","pytest","python"],"created_at":"2024-10-01T12:53:15.873Z","updated_at":"2025-12-11T21:04:27.302Z","avatar_url":"https://github.com/asmeurer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pytest-flakes\n=============\n\npy.test plugin for efficiently checking python source with pyflakes.\n\n\nUsage\n-----\n\ninstall via::\n\n    pip install pytest-flakes\n\nif you then type::\n\n    py.test --flakes\n\nevery file ending in ``.py`` will be discovered and run through pyflakes,\nstarting from the command line arguments.\n\nSimple usage example\n-----------------------------\n\nConsider you have this code::\n\n    # content of module.py\n\n    import os\n    from os.path import *\n\n    def some_function():\n        pass\n\nRunning it with pytest-flakes installed shows two issues::\n\n    $ py.test -q --flakes\n    F\n    ================================= FAILURES =================================\n    ______________________________ pyflakes-check ______________________________\n    /tmp/doc-exec-685/module.py:2: UnusedImport\n    'os' imported but unused\n    /tmp/doc-exec-685/module.py:3: ImportStarUsed\n    'from os.path import *' used; unable to detect undefined names\n    1 failed in 0.00 seconds\n\nThese are only two of the many issues that pytest-flakes can find.\n\nConfiguring pyflakes options per project and file\n-------------------------------------------------\n\nYou may configure pyflakes-checking options for your project\nby adding an ``flakes-ignore`` entry to your ``setup.cfg``\nor ``pytest.ini`` file like this::\n\n    # content of setup.cfg\n    [pytest]\n    flakes-ignore = ImportStarUsed\n\nThis would globally prevent complaints about star imports.\nRerunning with the above example will now look better::\n\n    $ py.test -q --flakes\n    F\n    ================================= FAILURES =================================\n    _________________ pyflakes-check(ignoring ImportStarUsed) __________________\n    /tmp/doc-exec-685/module.py:2: UnusedImport\n    'os' imported but unused\n    1 failed in 0.00 seconds\n\nBut of course we still would want to delete the ``import os`` line to\nhave a clean pass.\n\nIf you have some files where you want to specifically ignore\nsome errors or warnings you can start a flakes-ignore line with\na glob-pattern and a space-separated list of codes::\n\n    # content of setup.cfg\n    [pytest]\n    flakes-ignore =\n        *.py UnusedImport\n        doc/conf.py ALL\n\n\nIgnoring certain lines in files\n-------------------------------\n\nYou can ignore errors per line by appending special comments to them like this::\n\n    import sys # noqa\n    app # pragma: no flakes\n\n\nRunning pyflakes checks and no other tests\n------------------------------------------\n\nYou can restrict your test run to only perform \"flakes\" tests\nand not any other tests by typing::\n\n    py.test --flakes -m flakes\n\nThis will only run tests that are marked with the \"flakes\" keyword\nwhich is added for the flakes test items added by this plugin.\n\nIf you are using pytest \u003c 2.4, then use the following invocation\nto the same effect::\n\n    py.test --flakes -k flakes\n\n\nNotes\n-----\n\nThe repository of this plugin is at https://github.com/asmeurer/pytest-flakes\n\nFor more info on py.test see http://pytest.org\n\nThe code is partially based on Ronny Pfannschmidt's pytest-codecheckers plugin\nand Holger Krekel's pytest-pep8.\n\n\nChanges\n=======\n\n4.0.5 - 2021-12-02\n------------------\n- Further fixes for deprecations in the upcoming pytest 7.0. [nicoddemus]\n\n4.0.4 - 2021-10-26\n------------------\n- Fix pytest-flakes for deprecations in the upcoming pytest 7.0. [bluetech]\n- Fix the pytest-flakes test suite in Python 3.10. [bluetech]\n- Replace Travis CI with GitHub Actions. [bluetech]\n\n4.0.3 - 2020-11-27\n------------------\n\n- Future proof some code against future versions of pytest. [RonnyPfannschmidt]\n\n4.0.2 - 2020-09-18\n------------------\n\n- Fix calling pytest --flakes directly on an __init__.py file. [akeeman]\n\n4.0.1 - 2020-07-28\n------------------\n\n- Maintenance of pytest-flakes has moved from fschulze to asmeurer. The repo\n  for pytest-flakes is now at https://github.com/asmeurer/pytest-flakes/\n\n- Fix test failures.\n  [asmeurer]\n\n- Fix deprecation warnings from pytest.\n  [asmeurer]\n\n- Fix invalid escape sequences.\n  [akeeman]\n\n4.0.0 - 2018-08-01\n------------------\n\n- Require pytest \u003e= 2.8.0 and remove pytest-cache requirement.\n  Cache is included in pytest since that version.\n  [smarlowucf (Sean Marlow)]\n\n\n3.0.2 - 2018-05-16\n------------------\n\n- Fix typo in name of ``flakes`` marker.\n  [fschulze]\n\n\n3.0.1 - 2018-05-16\n------------------\n\n- Always register ``flakes`` marker, not only when the ``--flakes`` option\n  is used.\n  [fschulze]\n\n\n3.0.0 - 2018-05-16\n------------------\n\n- Drop support for Python 3.3. It still works so far, but isn't tested anymore.\n  [fschulze]\n\n- Add ``flakes`` marker required since pytest 3.1.\n  [fschulze]\n\n- Use pyflakes.api.isPythonFile to detect Python files. This might test more\n  files than before and thus could cause previously uncaught failures.\n  [asmeurer (Aaron Meurer)]\n\n\n2.0.0 - 2017-05-12\n------------------\n\n- Dropped support/testing for Python 2.5, 2.6, 3.2.\n  [fschulze]\n\n- Added testing for Python 3.6.\n  [fschulze]\n\n- Fixed some packaging and metadata errors.\n  [fladi (Michael Fladischer), fschulze]\n\n\n1.0.1 - 2015-09-17\n------------------\n\n- Compatibility with upcoming pytest.\n  [RonnyPfannschmidt (Ronny Pfannschmidt)]\n\n\n1.0.0 - 2015-05-01\n------------------\n\n- Fix issue #6 - support PEP263 for source file encoding.\n  [The-Compiler (Florian Bruhin), fschulze]\n\n- Clarified license to be MIT like pytest-pep8 from which this is derived.\n  [fschulze]\n\n\n0.2 - 2013-02-11\n----------------\n\n- Adapt to pytest-2.4.2 using ``add_marker()`` API.\n  [fschulze, hpk42 (Holger Krekel)]\n\n- Allow errors to be skipped per line by appending # noqa or # pragma: no flakes\n  [fschulze, silviot (Silvio Tomatis)]\n\n- Python 3.x compatibility.\n  [fschulze, encukou (Petr Viktorin)]\n\n\n0.1 - 2013-02-04\n----------------\n\n- Initial release.\n  [fschulze (Florian Schulze)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmeurer%2Fpytest-flakes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmeurer%2Fpytest-flakes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmeurer%2Fpytest-flakes/lists"}