8 Commits

Author SHA1 Message Date
Daniel Duan
3dfc40898c [NFC] Remove Python 2 imports from __future__ (#42086)
The `__future__` we relied on is now,  where the 3 specific things are
all included [since Python 3.0](https://docs.python.org/3/library/__future__.html):

* absolute_import
* print_function
* unicode_literals
* division

These import statements are no-ops and are no longer necessary.
2022-04-13 14:01:30 -07:00
Allan Shortlidge
d21352d0fd Utils: Update python_lint.py flake8 installation suggestion to specify python3 instead of python. 2022-01-24 12:00:36 -08:00
Rob Prentiss
05fc4f1004 Update python_lint shebang to 'python3'
With the Python 3 changes to the repo, the linter now needs to be called
with python3 explicitly, so that there are no syntax errors.
2021-11-16 14:38:00 -08:00
Ross Bayer
c096e29967 [Python: flake8] Update the utils/python_lint.py script to fail with a non-zero exit code if flake8 and flake8-import-order are not installed. 2020-02-03 13:10:15 -08:00
Ross Bayer
b9041798d7 [Build System: Python] Cleaned-up the python_lint.py script. 2020-01-19 12:15:21 -08:00
Manav Rathi
82d6780383 Minor improvements to the Python linter (#12079)
* Mention utils/python_lint.py in docs/ContinuousIntegration.md

* Improve error messages in utils/python_lint.py

* Make python_lint.py fail if required modules are not found

Previously, it returned 0 in such a case, which is considered as a
successful exit.

* Continue returning success when missing modules [python_lint.py]

Reverts ffd3b7832f
2017-09-23 23:23:54 -04:00
Michael Gottesman
e3858d304c [build-script] Use the build-script-impl from the swift repo that invoked build-script.
In the past if one wanted to be able to develop using multiple swift repos, one
was often stymied by build-script always using build-script-impl from the swift
directory. This includes the case where one invokes the build-script from a
hypothetical directory called swift-2.
2017-03-30 14:32:54 -07:00
Hugh Bellamy
abfca72357 Run python linting on the file if running doctests 2017-03-27 12:31:56 +07:00