File tree Expand file tree Collapse file tree 5 files changed +50
-12
lines changed
Expand file tree Collapse file tree 5 files changed +50
-12
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,10 @@ repos:
101101
102102 - id : vulture
103103 name : vulture
104- entry : python -m vulture
104+ entry : python -m vulture .
105105 language : system
106106 types_or : [python]
107+ pass_filenames : false
107108
108109 - id : pyroma
109110 name : pyroma
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
2626 item .obj = beartype (obj = item .obj )
2727
2828
29- @pytest .fixture
30- def make_image_file (
29+ @pytest .fixture ( name = "make_image_file" )
30+ def fixture_make_image_file (
3131 high_quality_image : io .BytesIO ,
3232) -> Generator [None , None , None ]:
3333 """
@@ -41,8 +41,8 @@ def make_image_file(
4141 new_image .unlink ()
4242
4343
44- @pytest .fixture
45- def mock_vws () -> Generator [None , None , None ]:
44+ @pytest .fixture ( name = "mock_vws" )
45+ def fixture_mock_vws () -> Generator [None , None , None ]:
4646 """
4747 Yield a mock VWS.
4848
Original file line number Diff line number Diff line change 6262 "python" : ("https://docs.python.org/3.12" , None ),
6363}
6464nitpicky = True
65- nitpick_ignore = (
66- ("py:class" , "BytesIO" ),
67- ("py:class" , "BufferedRandom" ),
68- ("py:class" , "_io.BytesIO" ),
69- ("py:class" , "_io.BufferedRandom" ),
70- )
65+ nitpick_ignore = (("py:class" , "_io.BytesIO" ),)
7166warning_is_error = True
7267
7368autoclass_content = "both"
Original file line number Diff line number Diff line change @@ -342,3 +342,45 @@ ignore_path = [
342342 " ./src/*.egg-info/" ,
343343 " ./src/*/_setuptools_scm_version.txt" ,
344344]
345+
346+ [tool .vulture ]
347+ # Ideally we would limit the paths to the source code where we want to ignore names,
348+ # but Vulture does not enable this.
349+ ignore_names = [
350+ # pytest configuration
351+ " pytest_collect_file" ,
352+ " pytest_collection_modifyitems" ,
353+ " pytest_plugins" ,
354+ # pytest fixtures - we name fixtures like this for this purpose
355+ " fixture_*" ,
356+ # Sphinx
357+ " autoclass_content" ,
358+ " autoclass_content" ,
359+ " autodoc_member_order" ,
360+ " copybutton_exclude" ,
361+ " extensions" ,
362+ " html_show_copyright" ,
363+ " html_show_sourcelink" ,
364+ " html_show_sphinx" ,
365+ " html_theme" ,
366+ " html_theme_options" ,
367+ " html_title" ,
368+ " htmlhelp_basename" ,
369+ " intersphinx_mapping" ,
370+ " language" ,
371+ " linkcheck_ignore" ,
372+ " linkcheck_retries" ,
373+ " master_doc" ,
374+ " nitpicky" ,
375+ " nitpick_ignore" ,
376+ " project_copyright" ,
377+ " pygments_style" ,
378+ " rst_prolog" ,
379+ " source_suffix" ,
380+ " spelling_word_list_filename" ,
381+ " templates_path" ,
382+ " warning_is_error" ,
383+ ]
384+
385+ # Duplicate some of .gitignore
386+ exclude = [" .venv" ]
Original file line number Diff line number Diff line change 1515
1616
1717@pytest .fixture (name = "_mock_database" )
18- def mock_database () -> Generator [VuforiaDatabase , None , None ]:
18+ def fixture_mock_database () -> Generator [VuforiaDatabase , None , None ]:
1919 """
2020 Yield a mock ``VuforiaDatabase``.
2121 """
You can’t perform that action at this time.
0 commit comments