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

Check shebang scripts are executable #143

Merged
merged 12 commits into from
Feb 26, 2024
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
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-yaml
- id: check-shebang-scripts-are-executable
- id: check-xml
- id: check-yaml
- repo: https://github.com/psf/black
# Use same version as in setup.py
rev: 22.8.0
hooks:
- id: black
args:
- --line-length=79
- repo: https://github.com/PyCQA/flake8
# Use same version as in setup.py
rev: 5.0.4
hooks:
- id: flake8
Empty file modified bug_reports/check_pycharm_generator_hint.py
100644 → 100755
Empty file.
2 changes: 0 additions & 2 deletions crate_anon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/__init__.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/ancillary/timely_project/dd_criteria.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/ancillary/timely_project/dd_criteria.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/ancillary/timely_project/timely_filter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/ancillary/timely_project/timely_filter.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/ancillary/timely_project/timely_filter_cpft_rio.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/ancillary/timely_project/timely_filter_cpft_rio.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/ancillary/timely_project/timely_filter_systmone.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/ancillary/timely_project/timely_filter_systmone.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/__init__.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/altermethod.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/altermethod.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/anonregex.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/anonregex.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/anonymise.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/anonymise.py

Expand Down
Empty file modified crate_anon/anonymise/anonymise_cli.py
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions crate_anon/anonymise/check_text_extractor.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ def main() -> None:
ext = None
available = is_text_extractor_available(ext)
print(f"Text extractor for extension {ext} present: {available}")


if __name__ == "__main__":
main()
2 changes: 0 additions & 2 deletions crate_anon/anonymise/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/config.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/config_singleton.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/config_singleton.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/constants.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/dbholder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/dbholder.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/dd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/dd.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/ddr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/ddr.py
Expand Down
4 changes: 4 additions & 0 deletions crate_anon/anonymise/demo_config.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,7 @@ def main() -> None:
else:
contents = get_demo_config()
print(contents, file=f)


if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions crate_anon/anonymise/draft_dd.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,7 @@ def main() -> None:
systmone_alter_loaded_rows=args.systmone_alter_loaded_rows,
systmone_table_info_in_comments=args.systmone_table_info_in_comments,
)


if __name__ == "__main__":
main()
2 changes: 0 additions & 2 deletions crate_anon/anonymise/eponyms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/eponyms.py
Expand Down
Empty file modified crate_anon/anonymise/fetch_wordlists.py
100644 → 100755
Empty file.
Empty file modified crate_anon/anonymise/launch_multiprocess_anonymiser.py
100644 → 100755
Empty file.
2 changes: 0 additions & 2 deletions crate_anon/anonymise/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/models.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/anonymise/patient.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/patient.py

Expand Down
4 changes: 4 additions & 0 deletions crate_anon/anonymise/researcher_report.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -820,3 +820,7 @@ def main() -> None:
)

mk_researcher_report_pdf(reportcfg)


if __name__ == "__main__":
main()
2 changes: 0 additions & 2 deletions crate_anon/anonymise/scrub.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/scrub.py
Expand Down
4 changes: 4 additions & 0 deletions crate_anon/anonymise/show_counts.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,7 @@ def main() -> None:
from crate_anon.anonymise.config_singleton import config # delayed import

show_record_counts(config)


if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions crate_anon/anonymise/subset_db.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -613,3 +613,7 @@ def main() -> None:
)
subsetter = Subsetter(subsetcfg)
subsetter.subset_db()


if __name__ == "__main__":
main()
4 changes: 4 additions & 0 deletions crate_anon/anonymise/summarize_dd.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@ def main() -> None:
from crate_anon.anonymise.config_singleton import config # delayed import

summarize_dd(config, args.output)


if __name__ == "__main__":
main()
Empty file modified crate_anon/anonymise/test_anonymisation.py
100644 → 100755
Empty file.
Empty file modified crate_anon/anonymise/test_extract_text.py
100644 → 100755
Empty file.
Empty file modified crate_anon/anonymise/tests/anonregex_tests.py
100644 → 100755
Empty file.
2 changes: 0 additions & 2 deletions crate_anon/anonymise/tests/scrub_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/anonymise/tests/scrub_tests.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/__init__.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/argparse_assist.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/argparse_assist.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/bugfix_flashtext.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/bugfix_flashtext.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/constants.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/dockerfunc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/dockerfunc.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/exceptions.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/extendedconfigparser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/extendedconfigparser.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/file_io.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/file_io.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/formatting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/formatting.py
Expand Down
4 changes: 1 addition & 3 deletions crate_anon/common/inputfunc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env python

"""
crate_anon/nlp_manager/run_crate_nlp_demo.py
crate_anon/common/inputfunc.py

===============================================================================

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/logfunc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

r"""
crate_anon/common/logfunc.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/memsize.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/memsize.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/parallel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/parallel.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/profiling.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/profiling.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/regex_helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/regex_helpers.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/spreadsheet.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/spreadsheet.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/sql.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/sql.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/stringfunc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/stringfunc.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/tests/regex_helper_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/tests/regex_helper_tests.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/tests/spreadsheet_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/tests/spreadsheet_tests.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/tests/sql_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/tests/sql_tests.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/common/tests/stringfunc_tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/common/tests/stringfunc_tests.py
Expand Down
2 changes: 0 additions & 2 deletions crate_anon/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/conftest.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/__init__.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/anonymise_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/anonymise_api/__init__.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/__init__.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/apps.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/constants.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/settings.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/test_settings.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/urls.py

Expand Down
2 changes: 0 additions & 2 deletions crate_anon/crateweb/config/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

"""
crate_anon/crateweb/config/wsgi.py

Expand Down
Loading
Loading