mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 67054: Added .tox to files excluded by Python linter.
Date Fri, 11 May 2018 11:26:48 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67054/#review202925
-----------------------------------------------------------



This looks good, but I think we should also add the .virtualenv and .tox directories to our
.gitignore. They should never be part of the list of files that are being processed by mesos-style.py
during a commit hook anyway.

- Kevin Klues


On May 10, 2018, 10:56 a.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67054/
> -----------------------------------------------------------
> 
> (Updated May 10, 2018, 10:56 a.m.)
> 
> 
> Review request for mesos, Eric Chung and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added .tox to files excluded by Python linter.
> 
> 
> Diffs
> -----
> 
>   support/mesos-style.py 07074daa245ab503cf551201ccadeac8cc10206d 
> 
> 
> Diff: https://reviews.apache.org/r/67054/diff/1/
> 
> 
> Testing
> -------
> 
> Before change, when running `python mesos-style.py`:
> ```
> Checking 1769 Python files
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pylint/test/functional/redefined_builtin.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
"""Tests for redefining builtins."""
> from __future__ import print_function
> 
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/astroid/tests/testdata/python2/data/all.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
> name = 'a'
> _bla = 2
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/_pytest/monkeypatch.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
""" monkeypatching and mocking functionality.  """
> from __future__ import absolute_import, division, print_function
> 
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/PyInstaller/lib/altgraph/Graph.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
"""
> altgraph.Graph - Base Graph class
> =================================
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
######################## BEGIN LICENSE BLOCK ########################
> # The Original Code is mozilla.org code.
> #
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/astroid/tests/testdata/python2/data/package/absimport.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
from __future__ import absolute_import, print_function
> import import_package_subpackage_module # fail
> print(import_package_subpackage_module)
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/kazoo/protocol/states.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
"""Kazoo State and Event objects"""
> from collections import namedtuple
> 
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pylint/test/input/func_no_dummy_redefined.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
"""Make sure warnings about redefinitions do not trigger for dummy variables."""
> from __future__ import print_function
> 
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pip/_vendor/requests/hooks.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
# -*- coding: utf-8 -*-
> 
> """
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pip/_vendor/lockfile/__init__.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
# -*- coding: utf-8 -*-
> 
> """
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pygments/lexers/installers.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
# -*- coding: utf-8 -*-
> """
>     pygments.lexers.installers
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/wheel/wininst2wheel.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
#!/usr/bin/env python
> import distutils.dist
> import os.path
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pip/vcs/__init__.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
"""Handles all VCS (version control) support"""
> from __future__ import absolute_import
> 
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/pygments/cmdline.py:1:
A license header should appear's on one of the first line of the file starting with '# Licensed'.:
# -*- coding: utf-8 -*-
> """
>     pygments.cmdline
> src/python/cli_new/.tox/py27-lint/lib/python2.7/site-packages/_pytest/compat.py:1: A
license header should appear's on one of the first line of the file starting with '# Licensed'.:
"""
> python version compatibility code
> """
> Traceback (most recent call last):
>   File "./support/mesos-style.py", line 517, in <module>
>     PY_ERRORS = PY_LINTER.main(sys.argv[1:])
>   File "./support/mesos-style.py", line 443, in main
>     return super(PyLinter, self).main(modified_files)
>   File "./support/mesos-style.py", line 207, in main
>     license_errors = self.check_license_header(filtered_candidates_set)
>   File "./support/mesos-style.py", line 107, in check_license_header
>     head = "".join([next(source_file) for _ in xrange(3)])
> StopIteration
> ```
> 
> After change:
> ```
> Checking 47 Python files
>   py27-lint: commands succeeded
>   congratulations :)
>   py27-lint: commands succeeded
>   congratulations :)
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message