Skip to content

Commit

Permalink
fix windows issue pre-commit (#37419)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Gorelli <m.e.gorelli@gmail.com>
  • Loading branch information
MarcoGorelli authored Oct 26, 2020
1 parent c85fbc7 commit 3c695dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 3c695dc

Please sign in to comment.