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

"Interaction" with pre-commit: ideally should skip the skipped files. #3196

Open
yarikoptic opened this issue Nov 2, 2023 · 10 comments · May be fixed by #3198
Open

"Interaction" with pre-commit: ideally should skip the skipped files. #3196

yarikoptic opened this issue Nov 2, 2023 · 10 comments · May be fixed by #3198

Comments

@yarikoptic
Copy link
Contributor

I ran into it before but forgot to report, and now didn't find open issue. Currently inspired by PrefectHQ/prefect#10893 where running codespell in CLI directly results in no hits, but pre-commit reports:

codespell................................................................Failed
- hook id: codespell
- exit code: 65

.github/ISSUE_TEMPLATE/5_maintenance_ticket.yaml:1: maintenence ==> maintenance
.github/workflows/python-tests.yaml:62: automaticlly ==> automatically
.github/workflows/python-tests.yaml:246: automaticlly ==> automatically
.github/ISSUE_TEMPLATE/2_ui_bug_report.yaml:69: Browers ==> Browsers
ui/package-lock.json:2999: OT ==> TO, OF, OR, NOT
ui/package-lock.json:8411: OT ==> TO, OF, OR, NOT
src/prefect/_vendor/fastapi/utils.py:131: unecessary ==> unnecessary

Problems:

  1. If I define files to skip in codespell configuration (e.g. in .codespellrc), those files will not be skipped in pre-commit run --all since ( I guess) pre-commit would pass those paths explicitly to codespell invocation and thus it would not account for skip.

  2. Also, complimentary, may be codespell should check in .dotdirs like .github etc?

yarikoptic added a commit to yarikoptic/prefect that referenced this issue Nov 2, 2023
@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Nov 3, 2023

  1. It looks like we do skip explicitly passed files that match the skip list:
    $ echo unecessary > foobar
    $ 
    $ codespell foobar
    foobar:1: unecessary ==> unnecessary
    $ 
    $ codespell -S foobar foobar
    $ 
    
    Could it be that .codespellrc is not taken into account when codespell is run by pre-commit?
  2. Does option -H/--check-hidden help?

@yarikoptic
Copy link
Contributor Author

  1. Could it be that .codespellrc is not taken into account when codespell is run by pre-commit?

I think it might be more of the case of directories listed in skip

❯ grep skip .codespellrc
skip = .git,*.pdf,*.svg,versioneer.py,package-lock.json,_vendor,*.css
❯ codespell
❯ codespell **/_vendor
src/prefect/_vendor/fastapi/utils.py:131: unecessary ==> unnecessary

2. Does option -H/--check-hidden help?

oh, it does! besides that I need to skip .codespellrc explicitly then. I should probably make this "default" in my "codespellit" script.

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Nov 3, 2023

oh, it does! besides that I need to skip .codespellrc explicitly then. I should probably make this "default" in my "codespellit" script.

Mmmh.. I wonder whether we should always skip files named .codespellrc.

@DimitriPapadopoulos
Copy link
Collaborator

❯ grep skip .codespellrc
skip = .git,*.pdf,*.svg,versioneer.py,package-lock.json,_vendor,*.css
❯ codespell
❯ codespell src
❯ codespell src/prefect
❯ codespell src/prefect/_vendor
src/prefect/_vendor/fastapi/utils.py:131: unecessary ==> unnecessary
❯ codespell src/prefect/_vendor/fastapi
src/prefect/_vendor/fastapi/utils.py:131: unecessary ==> unnecessary

It looks like we don't test well enough the root directory passed as an argument.

@yarikoptic
Copy link
Contributor Author

FWIW, if I have missed the point above -- seems to apply also for target filename, not just folder:

❯ codespell community/front-end/ofe/
❯ codespell community/front-end/
❯ codespell community/
❯ codespell
❯ codespell --version
2.2.6
❯ pre-commit run --all codespell
codespell................................................................Failed
- hook id: codespell
- exit code: 65

community/front-end/ofe/requirements.txt:4: astroid ==> asteroid
community/front-end/ofe/website/ghpcfe/static/js/bootstrap.bundle.js:2947: trough ==> through
community/front-end/ofe/website/ghpcfe/static/js/bootstrap.bundle.js:3420: othwerise ==> otherwise
community/front-end/ofe/website/ghpcfe/static/js/bootstrap.bundle.js:3842: ofset ==> offset, of set
community/front-end/ofe/website/ghpcfe/static/js/bootstrap.bundle.js:3873: trough ==> through
community/front-end/ofe/website/ghpcfe/static/js/jquery.formset.js:166: thnaks ==> thanks
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:2176: guarnteed ==> guaranteed
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:6353: enhancments ==> enhancements
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:6521: enhancment ==> enhancement
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:7308: multipe ==> multiple
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8018: Deffered ==> Differed, Deferred
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8827: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8918: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8920: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8923: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8925: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8927: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8930: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8932: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8945: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8956: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8988: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8995: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:8997: calender ==> calendar
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:9493: overriden ==> overridden
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:10468: modfied ==> modified
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:12226: openening ==> opening
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:13972: inital ==> initial
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:16590: get's ==> gets
community/front-end/ofe/website/ghpcfe/static/js/jquery-ui.js:17906: durning ==> during

❯ grep skip .codespellrc
skip = .git,*.pdf,*.svg,*.min.js,*.js.map,js,requirements.txt

yarikoptic added a commit to yarikoptic/hpc-toolkit that referenced this issue Nov 28, 2023
rohitramu pushed a commit to GoogleCloudPlatform/cluster-toolkit that referenced this issue Nov 28, 2023
* Add rudimentary codespell config

* Add pre-commit definition for codespell

* ot -> it typo fix

* Some more skips for codespell

* [DATALAD RUNCMD] Do interactive fixing of some ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./community/front-end/ofe/script/service_account.sh ./community/front-end/ofe/website/ghpcfe/models.py ./community/front-end/ofe/website/ghpcfe/models.py ./community/modules/scripts/htcondor-install/files/autoscaler.py ./community/modules/scripts/ramble-setup/README.md ./docs/videos/healthcare-and-life-sciences/README.md ./examples/README.md ./tools/validate_configs/test_configs/README.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* 1 more typo fixed manually

* Skip (S)hortcuts, more words and files

* [DATALAD RUNCMD] run codespell throughout fixing typo automagically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Duplicate ignore of requirements.txt and js in pre-commit config

until codespell-project/codespell#3196 is addressed
ek-nag pushed a commit to ek-nag/hpc-toolkit that referenced this issue Nov 28, 2023
* Add rudimentary codespell config

* Add pre-commit definition for codespell

* ot -> it typo fix

* Some more skips for codespell

* [DATALAD RUNCMD] Do interactive fixing of some ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./community/front-end/ofe/script/service_account.sh ./community/front-end/ofe/website/ghpcfe/models.py ./community/front-end/ofe/website/ghpcfe/models.py ./community/modules/scripts/htcondor-install/files/autoscaler.py ./community/modules/scripts/ramble-setup/README.md ./docs/videos/healthcare-and-life-sciences/README.md ./examples/README.md ./tools/validate_configs/test_configs/README.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* 1 more typo fixed manually

* Skip (S)hortcuts, more words and files

* [DATALAD RUNCMD] run codespell throughout fixing typo automagically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Duplicate ignore of requirements.txt and js in pre-commit config

until codespell-project/codespell#3196 is addressed
ek-nag pushed a commit to ek-nag/hpc-toolkit that referenced this issue Dec 8, 2023
* Add rudimentary codespell config

* Add pre-commit definition for codespell

* ot -> it typo fix

* Some more skips for codespell

* [DATALAD RUNCMD] Do interactive fixing of some ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./community/front-end/ofe/script/service_account.sh ./community/front-end/ofe/website/ghpcfe/models.py ./community/front-end/ofe/website/ghpcfe/models.py ./community/modules/scripts/htcondor-install/files/autoscaler.py ./community/modules/scripts/ramble-setup/README.md ./docs/videos/healthcare-and-life-sciences/README.md ./examples/README.md ./tools/validate_configs/test_configs/README.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* 1 more typo fixed manually

* Skip (S)hortcuts, more words and files

* [DATALAD RUNCMD] run codespell throughout fixing typo automagically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Duplicate ignore of requirements.txt and js in pre-commit config

until codespell-project/codespell#3196 is addressed
@yarikoptic
Copy link
Contributor Author

ping on this issue -- any hope to get it addressed soon? need help?

yarikoptic added a commit to yarikoptic/pipx that referenced this issue Jan 22, 2024
yarikoptic added a commit to yarikoptic/pipx that referenced this issue Jan 22, 2024
@DimitriPapadopoulos
Copy link
Collaborator

I think this one is tougher than it seems.

Suppose we have this setup:

a
└── b
    └── c
        └── file.txt

If the skip list contains b/c, it should work with all of:

codespell -S b/c a
codespell -S b/c a/b
codespell -S b/c a/b/c
codespell -S b/c a/b/c/file.txt

Perhaps all cases are not relevant with pre-commit, but they should be addressed nevertheless.

To properly work under Windows, the path separator may need to be normalised.

Also should paths be normalised?

codespell -S b/c a/b/c/../../another_dir/another_file.txt

chrysle pushed a commit to pypa/pipx that referenced this issue Jan 23, 2024
…w typos (#1219)

* Add rudimentary codespell config

* Add pre-commit definition for codespell

* some ignores for codespell

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Move comment as well to reside within the config section for codespell

* skip .nox and do not look for go.sum

* [DATALAD RUNCMD] run codespell throughout fixing typo automagically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* Ignore all testdata (and not just one package name)

* Workaround for the codespell issue - duplicate exclude of testdata in pre-commit config

ref: codespell-project/codespell#3196

* Also ignore mypy_cache

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@yarikoptic
Copy link
Contributor Author

Also should paths be normalised?

yeah, probably since otherwise no way for all path components consideration, but then I think only the relative to CWD should be taken since otherwise the full path could contain it e.g. /home/mine/a/b/some/project/do/not/skip/me

@DimitriPapadopoulos
Copy link
Collaborator

It depends on how pre-commit calls codespell. Paths relative to CWD or absolute paths?

@yarikoptic
Copy link
Contributor Author

while at it (in django-rest-framework)

protocol from a single invocation of `pre-commit run --all -v codespell`
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/reverse.py', 'mkdocs.yml', 'tests/test_htmlrenderer.py', 'rest_framework/templates/rest_framework/inline/dict_field.html', 'rest_framework/templates/rest_framework/vertical/form.html', 'tests/test_negotiation.py', 'tests/test_settings.py', 'docs/tutorial/quickstart.md', 'rest_framework/templates/rest_framework/raw_data_form.html', 'docs/api-guide/fields.md', 'docs/tutorial/4-authentication-and-permissions.md', 'rest_framework/templates/rest_framework/admin.html', 'docs/topics/documenting-your-api.md', 'tests/test_validation_error.py', 'rest_framework/templates/rest_framework/filters/base.html', 'rest_framework/settings.py', 'docs_theme/css/default.css', 'tests/browsable_api/auth_urls.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/checks.py', 'docs/api-guide/settings.md', 'rest_framework/templates/rest_framework/horizontal/fieldset.html', 'docs/community/funding.md', 'rest_framework/schemas/openapi.py', 'rest_framework/templates/rest_framework/horizontal/dict_field.html', 'tests/test_relations_slug.py', 'rest_framework/templates/rest_framework/horizontal/radio.html', 'tests/schemas/test_openapi.py', 'docs/community/3.1-announcement.md', 'rest_framework/views.py', 'rest_framework/templates/rest_framework/admin/detail.html', 'rest_framework/parsers.py', 'rest_framework/utils/timezone.py', 'rest_framework/authtoken/views.py', 'rest_framework/documentation.py', 'rest_framework/static/rest_framework/css/prettify.css', 'docs/tutorial/3-class-based-views.md']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/response.py', 'tests/schemas/test_managementcommand.py', 'tests/generic_relations/__init__.py', 'rest_framework/utils/field_mapping.py', 'rest_framework/static/rest_framework/js/bootstrap.min.js', 'rest_framework/authtoken/migrations/0003_tokenproxy.py', 'tests/test_serializer_bulk_update.py', 'docs/api-guide/views.md', 'tests/test_one_to_one_with_inheritance.py', 'rest_framework/templatetags/rest_framework.py', 'PULL_REQUEST_TEMPLATE.md', 'rest_framework/utils/representation.py', 'rest_framework/templates/rest_framework/inline/textarea.html', 'docs/topics/internationalization.md', 'rest_framework/templates/rest_framework/inline/checkbox.html', 'tests/test_renderers.py', 'rest_framework/static/rest_framework/js/csrf.js', 'tests/utils.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'docs/api-guide/validators.md', 'docs/community/project-management.md', 'rest_framework/templates/rest_framework/inline/input.html', 'rest_framework/templates/rest_framework/vertical/radio.html', 'rest_framework/urls.py', 'tests/test_decorators.py', 'tests/test_reverse.py', 'tests/browsable_api/no_auth_urls.py', 'docs_theme/nav.html', 'rest_framework/templates/rest_framework/inline/radio.html', 'rest_framework/permissions.py', 'docs/api-guide/pagination.md', 'docs/community/3.0-announcement.md', 'docs/index.md', 'rest_framework/templates/rest_framework/horizontal/select_multiple.html', 'rest_framework/templates/rest_framework/horizontal/form.html', 'tests/test_description.py', 'docs/community/3.6-announcement.md']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/static/rest_framework/css/bootstrap-theme.min.css.map', 'rest_framework/static/rest_framework/js/prettify-min.js', 'requirements.txt', 'rest_framework/templates/rest_framework/horizontal/select.html', 'docs/api-guide/content-negotiation.md', 'rest_framework/templates/rest_framework/horizontal/list_fieldset.html', 'rest_framework/templates/rest_framework/admin/list.html', 'rest_framework/templates/rest_framework/vertical/select_multiple.html', 'tests/test_metadata.py', 'setup.py', 'rest_framework/decorators.py', 'rest_framework/management/commands/generateschema.py', 'rest_framework/templates/rest_framework/docs/langs/shell.html', 'rest_framework/static/rest_framework/css/bootstrap.min.css.map', 'tests/test_templatetags.py', 'docs/api-guide/exceptions.md', 'docs/api-guide/filtering.md', 'rest_framework/static/rest_framework/js/ajax-form.js']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/templates/rest_framework/docs/langs/javascript.html', 'docs_theme/css/prettify.css', 'rest_framework/templates/rest_framework/docs/auth/basic.html', 'rest_framework/templates/rest_framework/docs/index.html', 'rest_framework/templates/rest_framework/base.html', 'tests/test_atomic_requests.py', 'tests/authentication/migrations/__init__.py', 'rest_framework/throttling.py', 'docs/community/jobs.md', 'rest_framework/utils/humanize_datetime.py', 'tests/browsable_api/views.py', 'rest_framework/authtoken/migrations/__init__.py', 'rest_framework/utils/urls.py', 'rest_framework/templates/rest_framework/horizontal/textarea.html', '.github/workflows/codespell.yml', 'rest_framework/static/rest_framework/js/default.js', 'rest_framework/templates/rest_framework/docs/langs/shell-intro.html', 'docs/community/3.3-announcement.md']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'setup.cfg', 'tests/browsable_api/test_browsable_nested_api.py', 'rest_framework/validators.py', 'docs/community/3.13-announcement.md', 'rest_framework/templates/rest_framework/docs/sidebar.html', 'rest_framework/templates/rest_framework/inline/select_multiple.html', 'licenses/bootstrap.md', 'tests/test_templates.py', 'rest_framework/generics.py', 'docs/community/3.2-announcement.md', 'requirements/requirements-documentation.txt', 'rest_framework/templates/rest_framework/vertical/list_fieldset.html', 'rest_framework/templates/rest_framework/vertical/fieldset.html', 'rest_framework/serializers.py', 'rest_framework/authtoken/management/commands/__init__.py', 'requirements/requirements-optionals.txt', 'tests/schemas/test_get_schema_view.py', 'docs/api-guide/responses.md']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', '.pre-commit-config.yaml', 'rest_framework/templates/rest_framework/vertical/checkbox.html', 'MANIFEST.in', 'tests/test_throttling.py', 'rest_framework/authtoken/migrations/0004_alter_tokenproxy_options.py', '.github/stale.yml', 'tests/test_status.py', 'tests/test_relations.py', 'docs_theme/js/jquery-1.8.1-min.js', '.github/ISSUE_TEMPLATE/1-issue.md', 'docs/community/3.10-announcement.md', 'rest_framework/static/rest_framework/docs/css/highlight.css', 'rest_framework/authtoken/__init__.py', 'rest_framework/static/rest_framework/js/load-ajax-form.js', 'docs/api-guide/relations.md', 'docs/tutorial/1-serialization.md', 'rest_framework/static/rest_framework/fonts/fontawesome-webfont.svg', 'tests/test_multitable_inheritance.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'codecov.yml', 'SECURITY.md', 'tests/test_requests_client.py', 'rest_framework/authtoken/admin.py', 'rest_framework/authtoken/apps.py', 'rest_framework/utils/__init__.py', 'tests/test_permissions.py', '.github/ISSUE_TEMPLATE/config.yml', 'rest_framework/status.py', 'docs/api-guide/renderers.md', 'LICENSE.md', 'docs/CNAME', 'rest_framework/authtoken/management/commands/drf_create_token.py', 'rest_framework/static/rest_framework/css/bootstrap-theme.min.css', 'rest_framework/templates/rest_framework/vertical/dict_field.html', 'tests/generic_relations/test_generic_relations.py', 'tests/test_utils.py', 'tests/test_urlpatterns.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/schemas/generators.py', 'docs/topics/browsable-api.md', 'rest_framework/utils/serializer_helpers.py', '.github/workflows/main.yml', 'tests/test_fields.py', 'rest_framework/routers.py', 'rest_framework/templates/rest_framework/docs/interact.html', 'tox.ini', 'rest_framework/templates/rest_framework/inline/checkbox_multiple.html', 'docs/api-guide/format-suffixes.md', 'rest_framework/templates/rest_framework/login_base.html', 'tests/test_api_client.py', 'rest_framework/relations.py', 'tests/test_validation.py', 'tests/test_viewsets.py', 'tests/generic_relations/migrations/0001_initial.py', 'tests/test_middleware.py', 'tests/test_versioning.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'docs/community/3.8-announcement.md', 'tests/browsable_api/test_browsable_api.py', 'docs/api-guide/viewsets.md', 'tests/models.py', 'docs/api-guide/testing.md', 'rest_framework/static/rest_framework/css/default.css', 'docs/community/mozilla-grant.md', 'tests/test_response.py', 'rest_framework/templates/rest_framework/login.html', 'docs/community/3.12-announcement.md', 'rest_framework/static/rest_framework/docs/css/jquery.json-view.min.css', 'rest_framework/filters.py', '.gitignore', 'docs/community/3.4-announcement.md', 'rest_framework/schemas/views.py', 'rest_framework/templates/rest_framework/admin/dict_value.html', 'rest_framework/templates/rest_framework/vertical/checkbox_multiple.html', 'rest_framework/templates/rest_framework/schema.js']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/templates/rest_framework/inline/list_fieldset.html', 'rest_framework/templates/rest_framework/docs/langs/python-intro.html', 'rest_framework/templates/rest_framework/inline/fieldset.html', 'tests/__init__.py', 'docs/api-guide/parsers.md', 'tests/test_authtoken.py', 'rest_framework/static/rest_framework/docs/css/base.css', 'rest_framework/renderers.py', 'rest_framework/apps.py', 'rest_framework/templates/rest_framework/docs/langs/javascript-intro.html', 'rest_framework/fields.py', 'docs/community/3.7-announcement.md', 'tests/test_model_serializer.py', 'rest_framework/templates/rest_framework/vertical/list_field.html', 'docs/community/contributing.md', 'docs/community/3.14-announcement.md', 'docs/api-guide/serializers.md', 'tests/test_relations_pk.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/request.py', 'docs/api-guide/generic-views.md', 'rest_framework/templates/rest_framework/admin/list_value.html', 'docs/api-guide/caching.md', 'rest_framework/templates/rest_framework/admin/simple_list_value.html', 'rest_framework/exceptions.py', 'rest_framework/urlpatterns.py', 'rest_framework/templates/rest_framework/filters/ordering.html', 'rest_framework/static/rest_framework/docs/js/jquery.json-view.min.js', 'tests/test_testing.py', 'rest_framework/templates/rest_framework/docs/auth/token.html', 'docs/api-guide/reverse.md', 'rest_framework/static/rest_framework/js/jquery-3.7.1.min.js', 'rest_framework/templates/rest_framework/horizontal/checkbox_multiple.html', 'rest_framework/metadata.py', 'docs/api-guide/throttling.md', 'requirements/requirements-testing.txt', 'rest_framework/templates/rest_framework/inline/list_field.html']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'tests/authentication/models.py', 'rest_framework/mixins.py', '.codespellrc', 'tests/browsable_api/test_form_rendering.py', 'docs/api-guide/requests.md', 'rest_framework/templates/rest_framework/api.html', 'rest_framework/templates/rest_framework/docs/link.html', 'docs/api-guide/schemas.md', 'rest_framework/authtoken/migrations/0002_auto_20160226_1747.py', '.github/FUNDING.yml', 'docs_theme/css/bootstrap-responsive.css', 'rest_framework/utils/encoders.py', 'requirements/requirements-packaging.txt', 'rest_framework/utils/model_meta.py', 'rest_framework/authtoken/management/__init__.py', 'docs/api-guide/permissions.md', '.tx/config', 'tests/conftest.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'tests/schemas/views.py', 'docs/topics/ajax-csrf-cors.md', 'rest_framework/utils/mediatypes.py', 'rest_framework/viewsets.py', 'rest_framework/utils/json.py', 'docs_theme/js/prettify-1.0.js', 'rest_framework/authtoken/models.py', 'runtests.py', 'rest_framework/static/rest_framework/docs/js/api.js', 'tests/test_serializer_lists.py', 'docs/api-guide/routers.md', 'docs/community/3.5-announcement.md', 'tests/test_routers.py', 'tests/test_relations_hyperlink.py', 'tests/browsable_api/serializers.py', 'rest_framework/static/rest_framework/css/bootstrap-tweaks.css', 'rest_framework/templates/rest_framework/inline/select.html', 'docs/community/3.9-announcement.md']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/templates/rest_framework/docs/document.html', 'docs/tutorial/2-requests-and-responses.md', 'tests/test_lazy_hyperlinks.py', 'rest_framework/authtoken/migrations/0001_initial.py', 'docs_theme/main.html', 'tests/urls.py', 'docs/api-guide/authentication.md', 'rest_framework/schemas/inspectors.py', 'rest_framework/templates/rest_framework/horizontal/checkbox.html', 'tests/authentication/__init__.py', 'rest_framework/templates/rest_framework/horizontal/list_field.html', 'rest_framework/templates/rest_framework/docs/error.html', 'docs_theme/js/bootstrap-2.1.1-min.js', 'README.md', 'tests/test_exceptions.py', 'tests/schemas/test_coreapi.py', 'tests/importable/__init__.py', 'tests/test_views.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'rest_framework/static/rest_framework/css/bootstrap.min.css', 'tests/authentication/migrations/0001_initial.py', 'docs_theme/js/theme.js', 'rest_framework/authentication.py', 'tests/generic_relations/migrations/__init__.py', 'rest_framework/utils/breadcrumbs.py', 'rest_framework/pagination.py', 'rest_framework/templates/rest_framework/docs/langs/python.html', 'tests/browsable_api/__init__.py', 'rest_framework/templates/rest_framework/vertical/input.html', 'rest_framework/static/rest_framework/docs/js/highlight.pack.js', 'docs/topics/rest-hypermedia-hateoas.md', '.github/workflows/pre-commit.yml', 'rest_framework/schemas/__init__.py', 'tests/test_validators.py', 'rest_framework/compat.py', 'licenses/jquery.json-view.md', 'rest_framework/utils/html.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'tests/test_request.py', 'docs/topics/browser-enhancements.md', 'rest_framework/templates/rest_framework/pagination/previous_and_next.html', 'rest_framework/management/commands/__init__.py', 'docs_theme/404.html', 'tests/test_serializer_nested.py', 'docs/topics/writable-nested-serializers.md', 'rest_framework/templates/rest_framework/pagination/numbers.html', 'rest_framework/versioning.py', 'docs_theme/css/bootstrap.css', 'docs/community/3.11-announcement.md', 'CONTRIBUTING.md', 'tests/test_parsers.py', 'rest_framework/templatetags/__init__.py', 'rest_framework/negotiation.py', 'rest_framework/templates/rest_framework/inline/form.html', 'tests/test_prefetch_related.py', 'docs/community/release-notes.md']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'docs/api-guide/metadata.md', 'docs/community/third-party-packages.md', 'docs/tutorial/6-viewsets-and-routers.md', 'rest_framework/management/__init__.py', 'rest_framework/schemas/coreapi.py', 'docs/topics/html-and-forms.md', 'tests/test_write_only_fields.py', 'tests/test_encoders.py', 'docs/tutorial/5-relationships-and-hyperlinked-apis.md', 'tests/test_filters.py', 'rest_framework/templates/rest_framework/filters/search.html', 'rest_framework/utils/formatting.py', 'tests/test_bound_fields.py', 'rest_framework/templates/rest_framework/docs/auth/session.html', 'tests/generic_relations/models.py', 'rest_framework/templates/rest_framework/vertical/select.html', 'rest_framework/schemas/utils.py', 'tests/schemas/__init__.py']
codespell argv: ['/home/yoh/.cache/pre-commit/repo_g5kpzb_/py_env-python3/bin/codespell', 'docs/api-guide/status-codes.md', 'docs/api-guide/versioning.md', 'rest_framework/templates/rest_framework/horizontal/input.html', 'tests/test_pagination.py', 'docs/community/tutorials-and-resources.md', 'tests/authentication/test_authentication.py', 'rest_framework/authtoken/serializers.py', 'rest_framework/test.py', 'tests/test_serializer.py', 'rest_framework/static/rest_framework/fonts/glyphicons-halflings-regular.svg', 'rest_framework/static/rest_framework/css/font-awesome-4.0.3.css', 'rest_framework/__init__.py', 'tests/test_generics.py', 'rest_framework/templates/rest_framework/vertical/textarea.html', 'tests/importable/test_installed.py']

and the same when I run from subfolder. So - relative paths. I even did modification of a single file within subfolder and invoked within subfolder -- got relative path from the top

yarikoptic added a commit to yarikoptic/django-rest-framework that referenced this issue Jan 25, 2024
yarikoptic added a commit to yarikoptic/django-rest-framework that referenced this issue Jan 26, 2024
auvipy pushed a commit to encode/django-rest-framework that referenced this issue Feb 28, 2024
…fixed (#9234)

* Do not ignore .codespellrc from git

* Add rudimentary codespell config

* Add pre-commit definition for codespell

* more custom skips for codespell - long lines, lines with ú etc

* [DATALAD RUNCMD] Do interactive fixing of some ambigous typos

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./docs/community/release-notes.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

* BF: pre-commit needs to duplicate some of the skips for codespell

Known issue -- yet to be addressed:

codespell-project/codespell#3196

* Move codespell configuration into setup.cfg
yarikoptic added a commit to yarikoptic/common that referenced this issue Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants