Skip to content

Commit

Permalink
Apply small pre-v3.9.0-release fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed Apr 23, 2022
1 parent a5997dc commit bf6f924
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
steps:
- checkout
- run:
name: Run tests against Python 3.6 git 1.8.0
name: Run tests against Python 3.6 and git 1.8.0
command: PYTHON_VERSION=3.6 GIT_VERSION=1.8.0 bash ci/tox/ci-run.sh # Earliest versions of python/git supported by git-machete
- store_test_results:
path: test-results/
Expand All @@ -65,12 +65,12 @@ jobs:
steps:
- checkout
- run:
name: Run tests against Python 3.7 git 2.7.6
name: Run tests against Python 3.7 and git 2.7.6
command: PYTHON_VERSION=3.7 GIT_VERSION=2.7.6 bash ci/tox/ci-run.sh
- store_test_results:
path: test-results/

# Note that there is no particular reason for the below assignment of pep8/coverage/docs checks to Python version.
# Note that there is no particular reason for the below assignment of PEP8/coverage/docs checks to Python version.
# Each of these needs to be run against just one Python version
# (since there's very little chance that they pass under one version but fail under another),
# so let's spread these checks evenly across versions to reduce CI latency
Expand All @@ -81,7 +81,7 @@ jobs:
steps:
- checkout
- run:
name: Run tests against Python 3.8 git 2.25.0 (with pep8 check)
name: Run tests against Python 3.8 and git 2.25.0 (with PEP8 check)
command: PYTHON_VERSION=3.8 GIT_VERSION=2.25.0 CHECK_PEP8=true bash ci/tox/ci-run.sh
- store_test_results:
path: test-results/
Expand All @@ -91,7 +91,7 @@ jobs:
steps:
- checkout
- run:
name: Run tests against Python 3.9 git 2.30.1 (with coverage report)
name: Run tests against Python 3.9 and git 2.30.1 (with coverage report)
command: PYTHON_VERSION=3.9 GIT_VERSION=2.30.1 CHECK_COVERAGE=true bash ci/tox/ci-run.sh
- store_test_results:
path: test-results/
Expand All @@ -104,7 +104,7 @@ jobs:
steps:
- checkout
- run:
name: Run tests against Python 3.10 git 2.33.1 (with building docs)
name: Run tests against Python 3.10 and git 2.33.1 (with building docs)
command: PYTHON_VERSION=3.10 GIT_VERSION=2.33.1 BUILD_DOCS=true bash ci/tox/ci-run.sh
- store_test_results:
path: test-results/
Expand Down
2 changes: 1 addition & 1 deletion docs/source/cli_help/status.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ With ``--color=always``, git machete always emits colors and with ``--color=auto
<branch0>
|
o-<branch1> * # green (in sync with parent; asterisks for the current branch)
o-<branch1> * # green (in sync with parent; asterisk for the current branch)
| |
| x-<branch2> # red (not in sync with parent)
| |
Expand Down
2 changes: 1 addition & 1 deletion git_machete/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
<dim>
<branch0>
|
o-<branch1> * # green (in sync with parent; asterisks for the current branch)
o-<branch1> * # green (in sync with parent; asterisk for the current branch)
| |
| x-<branch2> # red (not in sync with parent)
| |
Expand Down
9 changes: 4 additions & 5 deletions git_machete/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,15 @@ class AnsiEscapeCodes:
try:
stdout = popen_cmd('tput', 'colors')[1]
__number_of_supported_colors = int(stdout)
except FileNotFoundError:
except Exception:
# If we cannot retrieve the number of supported colors, let's defensively assume it's low.
__number_of_supported_colors = 8
except ValueError:
__number_of_supported_colors = 8
__is_full_fledged_terminal = __number_of_supported_colors >= 256

# `GIT_MACHETE_DIM_AS_GRAY` remains undocumented as for now,
# was just needed for animated gifs to render correctly (`[2m`-style dimmed text was invisible)
# is just needed for animated gifs to render correctly
# (`[2m`-style dimmed text is invisible in asciicinema renders).
__dim_as_gray = os.environ.get('GIT_MACHETE_DIM_AS_GRAY') == 'true'
__is_full_fledged_terminal = __number_of_supported_colors >= 256

ENDC = '\033[0m'
BOLD = '\033[1m'
Expand Down

0 comments on commit bf6f924

Please sign in to comment.