Skip to content
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
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@ env:
BUILDIFIER_SHA256SUM: '4c985c883eafdde9c0e8cf3c8595b8bfdf32e77571c369bf8ddae83b042028d6'

jobs:
lint-python:
lint-python-flake8:
runs-on: ubuntu-16.04
strategy:
fail-fast: false
matrix:
# flake8 should run on each Python version that we target,
# because the errors and warnings can differ due to language
# changes, and we want to catch them all.
python_version: ['3.5', '3.7']
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.6'
python-version: ${{ matrix.python_version }}
architecture: 'x64'
- name: 'Install black and flake8'
- name: 'Install flake8'
run: |
python -m pip install -U pip
pip install -r ./tensorboard/pip_package/requirements_dev.txt
Expand All @@ -41,6 +48,20 @@ jobs:
# See: http://flake8.pycqa.org/en/3.7.8/user/error-codes.html
# Use the comment '# noqa: <error code>' to suppress.
run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

lint-python:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.6'
architecture: 'x64'
- name: 'Install black'
run: |
python -m pip install -U pip
pip install -r ./tensorboard/pip_package/requirements_dev.txt
- run: pip freeze --all
- name: 'Lint Python code for style with Black'
# You can run `black .` to fix all Black complaints.
run: black --check .
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[tool.black]
line-length = 80
target-version = ["py27", "py36", "py37", "py38"]
# TODO(@wchargin): Drop `py35` here once we drop support for Python 3.5
# and aren't affected by <https://bugs.python.org/issue9232>.
target-version = ["py27", "py35", "py36", "py37", "py38"]
4 changes: 2 additions & 2 deletions tensorboard/data/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def __init__(
max_wall_time,
plugin_content,
description,
display_name,
display_name
):
self._max_step = max_step
self._max_wall_time = max_wall_time
Expand Down Expand Up @@ -705,7 +705,7 @@ def __init__(
max_length,
plugin_content,
description,
display_name,
display_name
):
super(BlobSequenceTimeSeries, self).__init__(
max_step=max_step,
Expand Down