Skip to content

Commit

Permalink
feat: switch executable command to python3 (#72)
Browse files Browse the repository at this point in the history
I'm told that the correct thing to do is to run Python scripts with `python3` since `python` continues to reference v2. Fixes #67.

This change also updates the CI testing matrix to test against Python versions 3.10, 3.9, and 2.7.

BREAKING CHANGE: git-format-staged now runs with `python3` instead of `python`. You will need to have `python3` in your executable path.
  • Loading branch information
hallettj committed Mar 20, 2022
1 parent f8ca9fd commit b4ed564
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
dist: focal
language: python
python:
- 3.8
- 3.6
- 3.10
- 3.9
- 2.7

cache:
Expand Down
4 changes: 2 additions & 2 deletions git-format-staged
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Git command to transform staged files according to a command that accepts file
# content on stdin and produces output on stdout. This command is useful in
Expand All @@ -9,7 +9,7 @@
# Usage: git-format-staged [OPTION]... [FILE]...
# Example: git-format-staged --formatter 'prettier --stdin-filepath "{}"' '*.js'
#
# Tested with Python 3.6 and Python 2.7.
# Tested with Python 3.10 and Python 2.7.
#
# Original author: Jesse Hallett <jesse@sitr.us>

Expand Down

0 comments on commit b4ed564

Please sign in to comment.