Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: drop support for Python 3.5 #251

Merged
merged 3 commits into from
Jan 18, 2021
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
19 changes: 15 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,20 @@ repos:
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-blind-except, flake8-bugbear, flake8-comprehensions,
flake8-debugger, flake8-docstrings, flake8-isort, flake8-polyfill,
flake8-pytest, flake8-quotes, yesqa]
additional_dependencies:
[
flake8-blind-except,
flake8-bugbear,
flake8-comprehensions,
flake8-debugger,
flake8-docstrings,
flake8-isort,
flake8-polyfill,
flake8-pytest,
flake8-quotes,
flake8-typing-imports,
yesqa,
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.790
hooks:
Expand Down Expand Up @@ -81,4 +92,4 @@ repos:
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
additional_dependencies: ["@commitlint/config-conventional"]
16 changes: 14 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ language: python
# https://docs.travis-ci.com/user/reference/xenial/
os: linux
dist: xenial

# https://blog.travis-ci.com/2020-09-11-arm-on-aws
#dist: focal
#group: edge
#arch: arm64-graviton2
#virt: lxd

# I tried AWS Graviton2 above, it didn't work because of CodeClimate:
# /home/travis/.travis/functions: line 109: ./cc-test-reporter: cannot execute binary file: Exec format error
# Probably there is no pre-built binary for this architecture yet.
# https://docs.codeclimate.com/docs/configuring-test-coverage#section-locations-of-pre-built-binaries

install:
- pip install tox coveralls
before_script:
Expand All @@ -39,10 +51,10 @@ jobs:
include:
- stage: test
# Python 3.9 is not yet available as of May 25th 2020
python: 3.8
python: 3.9
- python: 3.8
- python: 3.7
- python: 3.6
- python: 3.5
# Thanks to https://github.com/cclauss/Travis-CI-Python-on-three-OSes/blob/master/.travis.yml
# TODO Build freezing on Windows, see comments on .travis/script.sh
# - name: "Python: 3.8"
Expand Down
19 changes: 7 additions & 12 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,33 @@ To set up Nitpick_ for local development:

3. Install Poetry_ globally using the recommended way.

4. Create your virtualenv with pyenv (or some other tool you prefer)::

pyenv virtualenv 3.5.6 nitpick
pyenv activate nitpick

5. Install packages::
4. Install packages::

poetry install

# Output:
# Installing dependencies from lock file
# ...

6. Create a branch for local development::
5. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

7. When you're done making changes, run pre-commit checks and tests with::
6. When you're done making changes, run pre-commit checks and tests with::

make

8. Commit your changes and push your branch to GitHub::
7. Commit your changes and push your branch to GitHub::

git add .
git commit -m "Your detailed description of your changes."
git commit -m "feat: detailed description of your changes"
git push origin name-of-your-bugfix-or-feature

9. Submit a pull request through the GitHub website.
8. Submit a pull request through the GitHub website.

10. If your pull request is accepted, all your commits will be squashed into one, and the `Conventional Commits Format <https://www.conventionalcommits.org/>`_ will be used on the commit message.
9. If your pull request is accepted, all your commits will be squashed into one, and the `Conventional Commits Format <https://www.conventionalcommits.org/>`_ will be used on the commit message.

Pull Request Guidelines
-----------------------
Expand Down
41 changes: 26 additions & 15 deletions docs/defaults.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,20 @@ Content of `styles/flake8.toml <https://raw.githubusercontent.com/andreoliwa/nit
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-blind-except, flake8-bugbear, flake8-comprehensions,
flake8-debugger, flake8-docstrings, flake8-isort, flake8-polyfill,
flake8-pytest, flake8-quotes, yesqa]
additional_dependencies:
[
flake8-blind-except,
flake8-bugbear,
flake8-comprehensions,
flake8-debugger,
flake8-docstrings,
flake8-isort,
flake8-polyfill,
flake8-pytest,
flake8-quotes,
flake8-typing-imports,
yesqa,
]
"""
# TODO suggest nitpick for external repos

Expand Down Expand Up @@ -316,18 +327,6 @@ Content of `styles/pylint.toml <https://raw.githubusercontent.com/andreoliwa/nit
["pyproject.toml".tool.poetry.dev-dependencies]
pylint = "*"

.. _default-python-3-5:

Python 3.5
----------

Content of `styles/python35.toml <https://raw.githubusercontent.com/andreoliwa/nitpick/develop/styles/python35.toml>`_:

.. code-block:: toml

["pyproject.toml".tool.poetry.dependencies]
python = "^3.5"

.. _default-python-3-6:

Python 3.6
Expand Down Expand Up @@ -363,3 +362,15 @@ Content of `styles/python38.toml <https://raw.githubusercontent.com/andreoliwa/n

["pyproject.toml".tool.poetry.dependencies]
python = "^3.8"

.. _default-python-3-9:

Python 3.9
----------

Content of `styles/python39.toml <https://raw.githubusercontent.com/andreoliwa/nitpick/develop/styles/python39.toml>`_:

.. code-block:: toml

["pyproject.toml".tool.poetry.dependencies]
python = "^3.9"
2 changes: 1 addition & 1 deletion docs/generate_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"pre-commit/python.toml": "pre-commit_ (Python hooks)",
"pylint.toml": "Pylint_",
"pytest.toml": "pytest_",
"python35.toml": "Python 3.5",
"python36.toml": "Python 3.6",
"python37.toml": "Python 3.7",
"python38.toml": "Python 3.8",
"python39.toml": "Python 3.9",
}
)
app = NitpickApp.create_app()
Expand Down
Loading