Skip to content

fix windows issue pre-commit #37419

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

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
name: Generate pip dependency from conda
description: This hook checks if the conda environment.yml and requirements-dev.txt are equal
language: python
entry: python -m scripts.generate_pip_deps_from_conda
entry: python scripts/generate_pip_deps_from_conda.py
files: ^(environment.yml|requirements-dev.txt)$
pass_filenames: false
additional_dependencies: [pyyaml]
Expand Down Expand Up @@ -102,23 +102,23 @@ repos:
- id: unwanted-patterns-strings-to-concatenate
name: Check for use of not concatenated strings
language: python
entry: ./scripts/validate_unwanted_patterns.py --validation-type="strings_to_concatenate"
entry: python scripts/validate_unwanted_patterns.py --validation-type="strings_to_concatenate"
files: \.(py|pyx|pxd|pxi)$
- id: unwanted-patterns-strings-with-wrong-placed-whitespace
name: Check for strings with wrong placed spaces
language: python
entry: ./scripts/validate_unwanted_patterns.py --validation-type="strings_with_wrong_placed_whitespace"
entry: python scripts/validate_unwanted_patterns.py --validation-type="strings_with_wrong_placed_whitespace"
files: \.(py|pyx|pxd|pxi)$
- id: unwanted-patterns-private-import-across-module
name: Check for import of private attributes across modules
language: python
entry: ./scripts/validate_unwanted_patterns.py --validation-type="private_import_across_module"
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_import_across_module"
types: [python]
exclude: ^(asv_bench|pandas/_vendored|pandas/tests|doc)/
- id: unwanted-patterns-private-function-across-module
name: Check for use of private functions across modules
language: python
entry: ./scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
entry: python scripts/validate_unwanted_patterns.py --validation-type="private_function_across_module"
types: [python]
exclude: ^(asv_bench|pandas/_vendored|pandas/tests|doc)/
- repo: https://github.com/asottile/yesqa
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate_unwanted_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def main(
is_failed: bool = False

for file_path in source_path:
with open(file_path) as file_obj:
with open(file_path, encoding="utf-8") as file_obj:
for line_number, msg in function(file_obj):
is_failed = True
print(
Expand Down